Multiple world space event cameras

Hi I have a script that swaps out my cameras.
Then i have a button in world space.

The issue is that the world space canvas script only allows one event camera to be plugged in, so i can only get one of the 2 cameras to interact with the world space button. How can I make both work?

Thanks

I’d say just create all the cameras you want and disable them. Then in your script with the button you can simply have the button enable one at a time. Like this:

public GameObject Camera1;
public GameObject Camera2;

void Start()
{
Camera1.gameobject.SetActive(false);
Camera2.gameobject.SetActive(false);
}
public void Button()
{
if (Camera1.gameObject.SetActive(false))
{
Camera1.gameobject.SetActive(false);
Camera2.gameobject.SetActive(true);
}

if (Camera2.gameObject.SetActive(false))
{
Camera1.gameobject.SetActive(true);
Camera2.gameobject.SetActive(false);
}
}

}