Skip to main content

Extensions

Extensions

Static Methods

AddComponentIfNeeded

T AddComponentIfNeeded(this GameObject gameObject, Boolean& found)

AddComponentToHierarchyIfNeeded

T AddComponentToHierarchyIfNeeded(this GameObject gameObject, Boolean& found)

GetComponentInParent

T GetComponentInParent(this Component obj, bool includeInactive)

Returns the first component of type T in this GameObject or any of its parents.

A component of the matching type, if found.

  • obj:The root GameObject.
  • includeInactive:If true, include inactive parents.