Exemplo n.º 1
0
 public void DoAfterRelease()
 {
     // 编辑时是通过OnEnable\OnDisable触发Initialize Release的
     if (Application.isPlaying)
     {
         LODManager.GetInstance().RemoveLODItem(this);
         m_LODGroup = null;
     }
 }
Exemplo n.º 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);
         }
     }
 }
Exemplo n.º 3
0
 public static LODManager GetInstance()
 {
     if (ms_Instance == null)
     {
         ms_Instance = FindObjectOfType <LODManager>();
         if (ms_Instance == null)
         {
             ms_Instance = new GameObject().AddComponent <LODManager>();
         }
     }
     return(ms_Instance);
 }
Exemplo n.º 4
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);
            }
        }
Exemplo n.º 5
0
 protected void OnDisable()
 {
     LODManager.GetInstance().RemoveLODItem(this);
 }