API reference
API reference
Select your platform
No SDKs available
No versions available

UnityObjectExtensions Class

Static Methods

DestroySafely ( unityObject )
Properly determines whether to use DestroyImmediate or Destroy dependent on the current state of the Editor.
Signature
static void Meta.WitAi.UnityObjectExtensions.DestroySafely(this Object unityObject)
Parameters
unityObject: this Object
Returns
void
GetOrAddComponent< T > ( unityObject )
Attempts to obtain a component and adds it if it does not already exist
Signature
static T Meta.WitAi.UnityObjectExtensions.GetOrAddComponent< T >(this GameObject unityObject)
Parameters
unityObject: this GameObject
Returns
T