private void Render(CableRoute route, float radius) { if (m_segmentSpawner == null) { return; } // Let OnDrawGizmos handle rendering when in prefab edit mode. // It's not possible to use RuntimeObjects while there. if (PrefabUtils.IsPartOfEditingPrefab(gameObject)) { return; } if (!Cable.RoutePointCurveUpToDate) { Cable.SynchronizeRoutePointCurve(); } m_segmentSpawner.Begin(); try { var points = Cable.GetRoutePoints(); for (int i = 1; i < points.Length; ++i) { m_segmentSpawner.CreateSegment(points[i - 1], points[i], radius); } } catch (System.Exception e) { Debug.LogException(e, this); } m_segmentSpawner.End(); }
private void Render(CableRoute route, float radius) { if (m_segmentSpawner == null) { return; } m_segmentSpawner.Begin(); try { var points = Cable.GetRoutePoints(); for (int i = 1; i < points.Length; ++i) { m_segmentSpawner.CreateSegment(points[i - 1], points[i], radius); } } catch (System.Exception e) { Debug.LogException(e, this); } m_segmentSpawner.End(); }
private void RenderRoute(WireRoute route, float radius) { if (route == null) { return; } m_segmentSpawner.Begin(); try { WireRouteNode[] nodes = route.ToArray(); for (int i = 1; i < nodes.Length; ++i) { m_segmentSpawner.CreateSegment(nodes[i - 1].Position, nodes[i].Position, radius); } } catch (System.Exception e) { Debug.LogException(e); } m_segmentSpawner.End(); }
private void Render(CableRoute route, float radius) { if (m_segmentSpawner == null) { return; } m_segmentSpawner.Begin(); try { var points = Cable.GetRoutePoints(); for (int i = 1; i < points.Length; ++i) { m_segmentSpawner.CreateSegment(points[i - 1], points[i], radius); } //CableRouteNode[] nodes = route.ToArray(); //for ( int i = 1; i < nodes.Length; ++i ) // m_segmentSpawner.CreateSegment( nodes[ i - 1 ].Position, nodes[ i ].Position, radius ); } catch (System.Exception e) { Debug.LogException(e, this); } m_segmentSpawner.End(); }