Hi guys,
I’m trying to display a second camera in the corner of my screen, then swap between which camera is the one in the corner and which is full screen. The problem I am getting is it seems 1 camera is always drawn on top, which is fine when it is the one in the corner, but means the other cant be seen when it is full screen. Anyone know how to fix this?
The code I have is:
if (Input.GetButtonDown("Fire1")){
//used to toggle between 2 states
if (bCameraToggle)
{
//swap camera rects
BodyCamera.camera.rect = new Rect(0.7f, 0.1f, 0.2f, 0.2f);
camera.rect = new Rect(0, 0, 1, 1);
//toggle
bCameraToggle = !bCameraToggle;
}
else
{
//swap camera rects
camera.rect = new Rect(0.7f, 0.1f, 0.2f, 0.2f);
BodyCamera.camera.rect = new Rect(0, 0, 1, 1);
//toggle
bCameraToggle = !bCameraToggle;
}
}