Exemplo n.º 1
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);
     }
 }
Exemplo n.º 2
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);
     }
 }
Exemplo n.º 3
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);
     }
 }
Exemplo n.º 4
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
        //}
    }