Ejemplo n.º 1
0
 void CleanSceneCameras()
 {
     Camera[] sceneCameras = SceneView.GetAllSceneCameras();
     for (int i = 0; i < sceneCameras.Length; i++)
     {
         PreviewCulling pc = sceneCameras[i].GetComponent <PreviewCulling>();
         if (pc)
         {
             DestroyImmediate(pc);
         }
     }
 }
Ejemplo n.º 2
0
 void CleanSceneCamera()
 {
     if (sceneCamera)
     {
         //remove the PreviewCulling script from the scene camera
         PreviewCulling pc = sceneCamera.GetComponent <PreviewCulling>();
         if (pc)
         {
             DestroyImmediate(pc);
         }
     }
 }