Beispiel #1
0
    private void Cam(string[] parameters)
    {
        //<<cam>> will disable camName
        if (parameters == null)
        {
            ResetCam();
            return;
        }

        //get cam
        CinemachineVirtualCamera newCam = SceneObjects.GetVCam(parameters[0]);

        //Debug.Log($"{newCam} selected, param0 {parameters[0]}");
        if (activeCam != null)
        {
            activeCam.gameObject.SetActive(false);
        }

        activeCam = newCam;

        //enable/disable cam
        if (activeCam)
        {
            activeCam.gameObject.SetActive(true);
            //Debug.Log("Enabling Cam!");
        }
    }