Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

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

OcclusionArea.center

Switch to Manual
public var center: Vector3;

Description

Center of the occlusion area relative to the transform.

	// Sets the center of the occlusion area to the center of the transform

@script RequireComponent(OcclusionArea)

transform.GetComponent.<OcclusionArea>().center = Vector3.zero;