void RemoveRenderEventCall() { foreach (Camera cam in Camera.allCameras) { NsRenderManager nsr = cam.GetComponent <NsRenderManager>(); if (nsr != null) { nsr.RemoveRenderEventCall(this); } } }
void OnDisable() { m_FBCamera.cullingMask = m_backCullingMask; NsRenderManager Ns = GetComponent <NsRenderManager>(); if (Ns != null) { GameObject.Destroy(Ns); } }
void RemoveRenderEventCall() { for (int i = 0; i < Camera.allCameras.Length; ++i) { NsRenderManager nsr = Camera.allCameras[i].GetComponent <NsRenderManager>(); if (nsr != null) { nsr.RemoveRenderEventCall(this); } } }
void AddRenderEventCall() { foreach (Camera cam in Camera.allCameras) { NsRenderManager nsr = cam.GetComponent <NsRenderManager>(); if (nsr == null) { nsr = cam.gameObject.AddComponent <NsRenderManager>(); } nsr.AddRenderEventCall(this); } }
void AddRenderEventCall() { for (int i = 0; i < Camera.allCameras.Length; ++i) { NsRenderManager nsr = Camera.allCameras[i].GetComponent <NsRenderManager>(); if (nsr == null) { nsr = Camera.allCameras[i].gameObject.AddComponent <NsRenderManager>(); } nsr.AddRenderEventCall(this); } }
private void RemoveRenderEventCall() { Camera[] allCameras = Camera.allCameras; for (int i = 0; i < allCameras.Length; i++) { Camera camera = allCameras[i]; NsRenderManager component = camera.GetComponent <NsRenderManager>(); if (component != null) { component.RemoveRenderEventCall(this); } } }
private void AddRenderEventCall() { Camera[] allCameras = Camera.allCameras; for (int i = 0; i < allCameras.Length; i++) { Camera camera = allCameras[i]; NsRenderManager nsRenderManager = camera.GetComponent <NsRenderManager>(); if (nsRenderManager == null) { nsRenderManager = camera.gameObject.AddComponent <NsRenderManager>(); } nsRenderManager.AddRenderEventCall(this); } }
void AddRenderEventCall() { //foreach (Camera cam in Camera.allCameras) //{ NsRenderManager nsr = Camera.main.GetComponent <NsRenderManager>(); if (nsr == null) { nsr = Camera.main.gameObject.AddComponent <NsRenderManager>(); } nsr.AddRenderEventCall(this); #if UNITY_ANDROID && !UNITY_EDITOR //在Android下关闭 nsr.enabled = false; #endif //} }