Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

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;