Version 3.3.1.2

UnityExtensions class

Namespace: Sirenix.Utilities
Assembly: Sirenix.Utilities
public static class UnityExtensions
Extends various Unity classes.
Inheritance
  • System.Object
  • UnityExtensions

Methods

SafeIsUnityNull(Object)
Determines whether a Unity object is null or "fake null", without ever calling Unity's own equality operators. This method is useful for checking if a Unity object is null, destroyed or missing at times when it is not allowed to call Unity's own equality operators, for example when not running on the main thread.
public static bool SafeIsUnityNull(this Object obj)
Parameters
UnityEngine.Object obj

The Unity object to check.

Returns
System.Boolean

True if the object is null, missing or destroyed; otherwise false.