Version: 2020.2
public int cullingMask ;

描述

用于选择性地渲染反射探针周围的某些部分。

如果 GameObjectlayerMask 和探针的 cullingMask 的逻辑与为零,则游戏对象对此探针不可见。 有关更多信息,请参阅 Layers

using UnityEngine;
using UnityEditor;

public class ExampleScript : MonoBehaviour { void Start() { var probe = GetComponent<ReflectionProbe>(); // Only render objects in the first layer (Default layer) when capturing the probe's texture probe.cullingMask = 1 << 0; } }

另请参阅:Camera.cullingMask

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961