Camera 作为Unity中最为重要的组件,充当着整个游戏世界大门的作用,只有有了它,用户才能看到游戏,可以说是游戏玩家的虚拟世界之眼睛。
作为开发者,首先就要彻底理解Camera的所有属性与作用,只有这样才能已最恰当的方式,将游戏呈献给玩家,让玩家毫不出戏、身临其境的游戏。
学习Uinty半年时间,一直在使用Camera,但是对有些属性还是一知半解。今天就将所有的理解写出来,方便别人也方便自己。对于其中有问题的,不理解的,后续也方便补充。
其中 每一个属性,我都将先列出Ceeger圣典上的说法,然后那个上面难免有很多不好理解的说法,我再用红字谈谈自己的想法
Clear Flags
Each Camera stores color and depth information when it renders its view. The portions of the screen that are not drawn in are empty, and will display the skybox by default. When you are using multiple Cameras, each one stores its own color and depth information in buffers, accumulating more data as each Camera renders. As any particular Camera in your scene renders its view, you can set the Clear Flags to clear different collections of the buffer information. This is done by choosing one of the four options:
每个相机在渲染时会存储颜色和深度信息。屏幕的未绘制部分是空的,默认情况下会显示天空盒。当你使用相机时,每一个都将自己的颜色和深度信息存储在缓冲区中,还将积累大量的每个相机的渲染数据。当场景中的任何特定相机进行渲染时,你可以设定清除标记以清除缓冲区信息的不同集合。可以通过下面四个四个选项之一来完成
Skybox 天空盒
This is the default setting. Any empty portions of the screen will display the current Camera's skybox. If the current Camera has no skybox set, it will default to the skybox chosen in the