- Home /
Display 1 No Cameras Rendering
I have searched for an answer for my problem, but can't seem to find one. I have a script so that when I press a button it switches to a different camera, but when it tries to switch to my second camera, it gives me the message 'Display 1 No Cameras Rendering'. I have tried many different methods to fix this, and nothing has worked.
This is my script:
{ public GameObject camera1; public GameObject camera2;
public void EnableCamera1()
{
camera1.SetActive(true);
camera2.SetActive(false);
}
public void EnableCamera2()
{
camera1.SetActive(false);
camera2.SetActive(true);
}
} Thanks in advance
Answer by AppleJuice1523 · Aug 12, 2020 at 12:42 PM
I fixed it. Turns out I had an old conflicting script, so I modified both scripts and ended up fixing it.
What issue was in the script? I have the same issue and not sure where it is co$$anonymous$$g from.
Answer by Razor1994 · Aug 11, 2020 at 10:18 AM
Looks like the error is thrown because when you call "EnableCamera2" you don't have any camera rendering since you disable the first one first.
One thing you could try is switching the order in "EnableCamera2" but keep in mind, for a short time you will have 2 cameras active which could throw an error telling you that 2 audio listeners are active at once.
But i would give it a try.
public void EnableCamera2()
{
camera2.SetActive(true);
camera1.SetActive(false);
}
At first I was using the built-in button function to enable/ disable the cameras which also wasn't working, but when I re-ordered them it didn't make a difference... I'll try reordering the script later when I can... hopefully it will work
If you want to, you can join my teamspeak and i can help you. Just let me know ^^ because i think without really seeing what you are doing this is very difficult
Just tried it then and it didn't work... idk what the problem is I guess it's just trial and error from here