public void DoAfterRelease() { // 编辑时是通过OnEnable\OnDisable触发Initialize Release的 if (Application.isPlaying) { LODManager.GetInstance().RemoveLODItem(this); m_LODGroup = null; } }
protected void InitializeLOD() { m_LODItemActive = true; if (MaxDisplayLODIndex != Constants.NOTSET_LOD_INDEX) { m_LODGroup = transform.GetComponentInParent <LODGroup>(); if (m_LODGroup) { LODManager.GetInstance().AddLODItem(this); } } }
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); }
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); } }
protected void OnDisable() { LODManager.GetInstance().RemoveLODItem(this); }