예제 #1
0
 public void DoAfterRelease()
 {
     // 编辑时是通过OnEnable\OnDisable触发Initialize Release的
     if (Application.isPlaying)
     {
         LODManager.GetInstance().RemoveLODItem(this);
         m_LODGroup = null;
     }
 }
예제 #2
0
 protected void InitializeLOD()
 {
     m_LODItemActive = true;
     if (MaxDisplayLODIndex != Constants.NOTSET_LOD_INDEX)
     {
         m_LODGroup = transform.GetComponentInParent <LODGroup>();
         if (m_LODGroup)
         {
             LODManager.GetInstance().AddLODItem(this);
         }
     }
 }
예제 #3
0
        protected void OnEnable()
        {
            if (LODGroup)
            {
                LODManager.GetInstance().AddLODItem(this);
            }

            m_LastLODIndex = Constants.NOTSET_LOD_INDEX;
            for (int iSwitch = 0; iSwitch < Switchs.Length; iSwitch++)
            {
                Switchs[iSwitch].SetActive(false);
            }
        }
예제 #4
0
 protected void OnDisable()
 {
     LODManager.GetInstance().RemoveLODItem(this);
 }