Version: 2022.3
public Vector3 size ;

描述

遮挡区域将具有的大小。

using UnityEngine;

[RequireComponent(typeof(OcclusionArea))] public class Example : MonoBehaviour { // Sets an Occlusion area of 10 units in x, 20 units in y and 30 units in z void Start() { transform.GetComponent<OcclusionArea>().size = new Vector3(10, 20, 30); } }