Yeah i have a mulitiplayer game And i have set player1 to have camera1 and player2 to have camera2, But when i "Run" it , it only shows one of the camera, how to make it show 2 cameras?
I don't know if is posible split the screen in 2 rectangles, one for each cam, but there are a posibility using render to texture. You have to make 2 textures and use one cam for each one. then, you have to show the 2 textures as a GUI for example.
it most certainly is possible. Camera1. Rect(0, 0, 1, 0.5) Camera2. Rect(0, 0.5, 1, 0.5) It all has to do with the Normalized Viewport Area. The numbers are based off of Screen.width and Screen.height (by percentage of them)
BigMisterB is correct, that's definitely the way to approach it. http://unity3d.com/support/documentation/ScriptReference/Camera-rect.html
// Change the width of the viewport each time space key is pressed function Update () { if (Input.GetButtonDown ("Jump")) { // choose the margin randomly var margin = Random.Range (0.0, 0.3); // setup the rectangle camera.rect = Rect (margin, 0, 1 - margin * 2, 1); } } So this is the code? But how do i get it to work