LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

This version of Unity is unsupported.

OcclusionArea.center

Switch to Manual
public Vector3 center;

Description

Center of the occlusion area relative to the transform.

using UnityEngine;
using System.Collections;

[RequireComponent(typeof(OcclusionArea))] public class ExampleClass : MonoBehaviour { void Example() { transform.GetComponent<OcclusionArea>().center = Vector3.zero; } }