Example #1
0
        protected virtual void TryRegister()
        {
            m_lastSeenSiblingIndex = transform.GetSiblingIndex();

            m_sdfGroup = GetComponentInParent <SDFGroup>();
            SetDirty();
        }
Example #2
0
        private void Reset()
        {
            m_group = GetComponent <SDFGroup>();

            if (!m_group)
            {
                GetComponentInParent <SDFGroup>();
            }

            m_renderer = gameObject.GetOrAddComponent <MeshRenderer>();
            m_filter   = gameObject.GetOrAddComponent <MeshFilter>();
            UpdateCubeMesh();

            if (m_materialInstance == null)
            {
                m_materialInstance = new Material(m_material);
            }

            m_renderer.material = m_materialInstance;
        }
Example #3
0
 protected virtual void TryDeregister()
 {
     m_sdfGroup = GetComponentInParent <SDFGroup>();
     SetClean();
 }