unity 相机分屏
Camera 有两个参数 控制 分屏
rect,depth
rect
Where on the screen is the camera rendered in normalized coordinates.
The values in rect range from zero (left/bottom) to one (right/top).
控制camera 在屏幕上的显示区域(0,0,1,1) 就是默认的全屏
depth
Description
Camera's depth in the camera rendering order.
Cameras with lower depth are rendered before cameras with higher depth.
Use this to control the order in which cameras are drawn if you have multiple cameras and some of them don't cover the full screen
控制camera的显示顺序 ,高的显示在前面
example;
cam.rect = new Rect(0.2f, 0.1f, 0.3f, 0.2f);

浙公网安备 33010602011771号