https://answers.unity.com/storage/attachments/110793-capture.png
The link is a picture showing the issue.
Hi, i have a camera that starts by doing an animation to showcase the level, then switches to another, (FPS Controller camera)
A couple of weeks ago i asked about it here and got a script to use. The script is:
-
public Camera Camera1;
public Camera Camera2;
private void Start()
{
StartCoroutine(CameraSwitch());
}
IEnumerator CameraSwitch()
{
Camera1.enabled = true;
Camera2.enabled = false;
yield return new WaitForSeconds(10);
Camera1.enabled = false;
Camera2.enabled = true;
}
-
This is supposed to accomplish what i wanted... but i received an error and the part of the script that says IEnumerator CameraSwitch() the CameraSwitch has the red swiggle, as if something is wrong. Thats the only issue i could find and i think it may be causing this message to appear (In the link provided)
Does anyone know why this error appears?
Thank you very much.
↧