Hello
i have 2 cameras, the main camera and camera1. I need to show the button in the camera 1 but when i start the game it appears anyways in the main camera.
PD: I disabled GUIlayer from the main camera but it doesnt work.
thank you
Hello
i have 2 cameras, the main camera and camera1. I need to show the button in the camera 1 but when i start the game it appears anyways in the main camera.
PD: I disabled GUIlayer from the main camera but it doesnt work.
thank you
Try one of the following:
function OnGUI () {
if(Camera.current != Camera.main){
//Render GUI
}
}
function OnGUI () {
if(Camera.current.name == "camera1"){
//Render GUI
}
}
Tyvm