Version: 2017.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