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); } } }
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); }