How to create a button that doesnt render in the main camera?

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 :slight_smile:

Try one of the following:

function OnGUI () {
    if(Camera.current != Camera.main){
            //Render GUI
        }
}

 function OnGUI () {
    if(Camera.current.name == "camera1"){
            //Render GUI
        }
}

Tyvm :slight_smile: