예제 #1
0
 private void InitializeBackMostCamera()
 {
     if (GameObject.Find("BackMostCamera") == null)
     {
         GameObject cameraObject = new GameObject();
         Camera     camera       = cameraObject.AddComponent <Camera>();
         camera.name        = "BackMostCamera";
         camera.clearFlags  = CameraClearFlags.Nothing;
         camera.cullingMask = 0;
         camera.depth       = Single.MaxValue;
         endHanlder         = camera.gameObject.AddComponent <OnFrameEndHandler>();
         endHanlder.enabled = false;
         cameraObject.SetActive(true);
         DontDestroyOnLoad(cameraObject);
     }
 }
예제 #2
0
 private void InitializeBackMostCamera()
 {
     if (GameObject.Find("BackMostCamera") == null) {
         GameObject cameraObject = new GameObject();
         Camera camera = cameraObject.AddComponent<Camera>();
         camera.name = "BackMostCamera";
         camera.clearFlags = CameraClearFlags.Nothing;
         camera.cullingMask = 0;
         camera.depth = Single.MaxValue;
         endHanlder = camera.gameObject.AddComponent<OnFrameEndHandler>();
         endHanlder.enabled = false;
         cameraObject.SetActive(true);
         DontDestroyOnLoad(cameraObject);
     }
 }