コード例 #1
0
        private void OnMarkAsDestroyedChanged(ExposeToEditor obj)
        {
            bool refresh = false;

            if (obj.MarkAsDestroyed)
            {
                for (int i = 0; i < m_types.Length; ++i)
                {
                    Component component = obj.GetComponent(m_types[i]);
                    if (component != null)
                    {
                        DestroyGizmo(obj.gameObject);
                        refresh = true;
                    }
                }
            }
            else
            {
                for (int i = 0; i < m_types.Length; ++i)
                {
                    Component component = obj.GetComponent(m_types[i]);
                    if (component != null)
                    {
                        GreateGizmo(obj.gameObject, component, m_types[i]);
                        refresh = true;
                    }
                }
            }

            if (refresh)
            {
                m_meshesCache.Refresh();
            }
        }
コード例 #2
0
 private void OnDestroyed(ExposeToEditor obj)
 {
     for (int i = 0; i < m_types.Length; ++i)
     {
         Component component = obj.GetComponent(m_types[i]);
         if (component != null)
         {
             DestroyGizmo(obj.gameObject);
         }
     }
 }
コード例 #3
0
 private static void OnAwaked(ExposeToEditor obj)
 {
     for (int i = 0; i < m_types.Length; ++i)
     {
         Component component = obj.GetComponent(m_types[i]);
         if (component != null)
         {
             m_instance.GreateGizmo(obj.gameObject, m_types[i]);
         }
     }
 }
コード例 #4
0
 private void OnAwaked(ExposeToEditor obj)
 {
     for (int i = 0; i < m_types.Length; ++i)
     {
         Component component = obj.GetComponent(m_types[i]);
         if (component != null)
         {
             GreateGizmo(obj.gameObject, m_types[i]);
         }
     }
     m_meshesCache.Refresh();
 }