Ejemplo n.º 1
0
    private GameObject TransferObjects;             //GameObject of the transferObjects script

    // Use this for initialization
    void Awake()
    {
        TransferObjects = GameObject.Find("LevelTransferObject");
        transferObjects tObject     = TransferObjects.GetComponent <transferObjects>();
        GameObject      otherCamera = tObject.getCamera();

        Destroy(otherCamera);
        //tObject.Destroy();
        Debug.Log("Switched Cameras successfully");
    }
Ejemplo n.º 2
0
    void Start()
    {
        Debug.Log("Loaded scene");
        OVRCameraRig    = GameObject.Find("OVRCameraRig");                          //find the rig from the last scene, we need to undo the screen fade
        pureBlackObject = GameObject.Find("blackBox");
        StartCoroutine(unFade());
        rand   = new Random();
        loader = SceneManager.LoadSceneAsync(2, LoadSceneMode.Single);
        loader.allowSceneActivation = false;
        StartCoroutine(colorChange());
        transferObjects tObjects = TransferObjects.GetComponent <transferObjects>();                 //get the transferObjects script from the TransferObjects gameObject

        tObjects.setCamera(OVRCameraRig);
    }