Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

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

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;