UnityExtensions class

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


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)
UnityEngine.Object obj

The Unity object to check.


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

This website is brand new and built with the Odin 2.1 beta in mind. This means you might discover some features such as attribute expressions that are only available in the beta.

You can download the 2.1 beta from here and read the patch-notes here.