camera.cullingmask 消隐遮罩

2015-1-4 02:07| 发布者: 杨炎| 查看: 2226| 评论: 0|原作者: 蛮牛|来自: yzc88亚洲城脚本manual

摘要: camera.cullingmask 消隐遮罩varcullingmask: intdescription描述this is used to render parts of the scene selectively.这个用来选择性的渲染部分场景。if thegameobject's layermask and the camera's cullingma ...

camera.cullingmask 消隐遮罩

varcullingmask: int

description描述

this is used to render parts of the scene selectively.

这个用来选择性的渲染部分场景。

if theobject" target="_blank" class="relatedlink">gameobject's layermask and the camera's cullingmask is zero then the game object will be invisible from this camera. seelayersfor more information.

如果gameobject的layermask与相机的cullingmask进行cullingmask操作后为0,那么这个游戏物体对于该相机是不可见的。参考layers获取更多信息。

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public void awake() {

camera.cullingmask = 1 << 0;

}

}

// only render objects in the first layer (default layer)

//只渲染在首个层中的物体(默认层)

camera.cullingmask = 1 << 0;

相关阅读

文章点评
相关文章