Version: 2020.2
public Vector3 center ;

描述

遮挡区域的中心(相对于变换位置)。

using UnityEngine;

[RequireComponent(typeof(OcclusionArea))] public class Example : MonoBehaviour { // Sets the center of the occlusion area to the center of the transform void Start() { transform.GetComponent<OcclusionArea>().center = Vector3.zero; } }