예제 #1
0
 void RemoveRenderEventCall()
 {
     foreach (Camera cam in Camera.allCameras)
     {
         NsRenderManager nsr = cam.GetComponent <NsRenderManager>();
         if (nsr != null)
         {
             nsr.RemoveRenderEventCall(this);
         }
     }
 }
예제 #2
0
    void OnDisable()
    {
        m_FBCamera.cullingMask = m_backCullingMask;

        NsRenderManager Ns = GetComponent <NsRenderManager>();

        if (Ns != null)
        {
            GameObject.Destroy(Ns);
        }
    }
예제 #3
0
 void RemoveRenderEventCall()
 {
     for (int i = 0; i < Camera.allCameras.Length; ++i)
     {
         NsRenderManager nsr = Camera.allCameras[i].GetComponent <NsRenderManager>();
         if (nsr != null)
         {
             nsr.RemoveRenderEventCall(this);
         }
     }
 }
예제 #4
0
 void AddRenderEventCall()
 {
     foreach (Camera cam in Camera.allCameras)
     {
         NsRenderManager nsr = cam.GetComponent <NsRenderManager>();
         if (nsr == null)
         {
             nsr = cam.gameObject.AddComponent <NsRenderManager>();
         }
         nsr.AddRenderEventCall(this);
     }
 }
예제 #5
0
 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);
     }
 }
예제 #6
0
 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);
         }
     }
 }
예제 #7
0
 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);
     }
 }
예제 #8
0
    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
        //}
    }