Esempio n. 1
0
        public static void OnVisualPrimitiveNodeDestruct(Utils.VisualPrimitive primitive)
        {
            if (primitive == null || primitive.Node == null)
            {
                return;
            }

            primitive.Node.transform.parent = null;
            m_visualPrimitives.Remove(primitive);

            GameObject.DestroyImmediate(primitive.Node);
        }
Esempio n. 2
0
        public static void OnVisualPrimitiveNodeCreate(Utils.VisualPrimitive primitive)
        {
            if (primitive == null || primitive.Node == null)
            {
                return;
            }

            // TODO: Fix so that "MouseOver" works for newly created primitives.
            if (primitive.Node.transform.parent != VisualsParent)
            {
                VisualsParent.AddChild(primitive.Node);
            }

            m_visualPrimitives.Add(primitive);
        }