Beispiel #1
0
        private static void DrawHandles(SuperColliderComponent component, GizmoType gizmoType)
        {
            // Only draw gizmos for the SuperObject if we have it in our set
            // This way users can disable gizmos for the SuperObject through the Gizmos menu
            if (!SuperColliderComponent.GizmoDrawCommands.Contains(component))
            {
                return;
            }
            else
            {
                SuperColliderComponent.GizmoDrawCommands.Remove(component);
            }

            if (m_Settings == null)
            {
                m_Settings = ST2USettings.GetOrCreateST2USettings();

                if (m_Settings == null)
                {
                    // If something goes wrong use some dummy settings
                    m_Settings = CreateInstance <ST2USettings>();
                }
            }

            if (m_Settings != null)
            {
                ColliderGizmos.DrawColliders(component.gameObject, m_Settings);
            }
        }
        public static void DrawColliderShapes(SuperColliderComponent collider, ST2USettings settings)
        {
            foreach (var shape in collider.m_PolygonShapes)
            {
                FillShape(collider.gameObject, shape.m_Points, settings);
            }

            foreach (var shape in collider.m_OutlineShapes)
            {
                OutlineShape(collider.gameObject, shape.m_Points, settings);
            }
        }