Class UnityObjectExtensions
Extension methods for Unity's Object class
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit
Assembly: cs.temp.dll.dll
Syntax
public static class UnityObjectExtensions
Methods
DestroyObject(Object, Single)
Destroys a Unity object appropriately depending if running in in edit or play mode.
Declaration
public static void DestroyObject(Object obj, float t = 0F)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | Unity object to destroy |
Single | t | Time in seconds at which to destroy the object, if applicable. |
DontDestroyOnLoad(Object)
Enable Unity objects to skip "DontDestroyOnLoad" when editor isn't playing so test runner passes.
Declaration
public static void DontDestroyOnLoad(this Object target)
Parameters
Type | Name | Description |
---|---|---|
Object | target |