private void DrawGizmos(bool isSelected) { if (Application.isPlaying) { return; } if (Wire == null || Wire.Route == null || Wire.Route.NumNodes < 2) { return; } if (!PrefabUtils.IsPartOfEditingPrefab(gameObject)) { return; } var routePoints = Wire.Route.Select(routePoint => routePoint.Position).ToArray(); var defaultColor = Color.Lerp(Color.black, Color.white, 0.55f); var selectedColor = Color.Lerp(defaultColor, Color.green, 0.15f); m_segmentSpawner?.DrawGizmos(routePoints, Wire.Radius, isSelected ? selectedColor : defaultColor); }
private void DrawGizmos(bool isSelected) { if (Application.isPlaying) { return; } if (Cable == null || Cable.Route == null || Cable.Route.NumNodes < 2) { return; } if (!PrefabUtils.IsPartOfEditingPrefab(gameObject)) { return; } var defaultColor = Color.Lerp(Color.black, Color.white, 0.15f); var selectedColor = Color.Lerp(defaultColor, Color.green, 0.15f); m_segmentSpawner?.DrawGizmos(Cable.GetRoutePoints(), Cable.Radius, isSelected ? selectedColor : defaultColor); }