Pathfinding.NavmeshCut.OnDrawGizmos C# (CSharp) Method

OnDrawGizmos() public method

public OnDrawGizmos ( ) : void
return void
		public void OnDrawGizmos () {
			
			if (tr == null) tr = transform;
			
			List<List<Pathfinding.ClipperLib.IntPoint>> buffer = Pathfinding.Util.ListPool<List<Pathfinding.ClipperLib.IntPoint>>.Claim();
			GetContour(buffer);
			Gizmos.color = GizmoColor;
			Bounds bounds = GetBounds();
			float ymin = bounds.min.y;
			Vector3 yoffset = Vector3.up * (bounds.max.y - ymin);
			
			for (int i=0;i<buffer.Count;i++) {
				List<Pathfinding.ClipperLib.IntPoint> cont = buffer[i];
				for (int j=0;j<cont.Count;j++) {
					Vector3 p1 = IntPointToV3(cont[j]);
					p1.y = ymin;
					Vector3 p2 = IntPointToV3(cont[(j+1) % cont.Count]);
					p2.y = ymin;
					Gizmos.DrawLine (p1,p2);
					Gizmos.DrawLine (p1+yoffset, p2+yoffset);
					Gizmos.DrawLine (p1, p1+yoffset);
					Gizmos.DrawLine (p2, p2+yoffset);
				}
			}
			
			Pathfinding.Util.ListPool<List<Pathfinding.ClipperLib.IntPoint>>.Release(buffer);
		}