Megadocs 0.0.1
All of megapop's internal libraries
Megapop.MegaCore.UnityUtil Class Reference

Provides static helper methods for Unity Objects. More...

Static Public Member Functions

static void SafeDestroy (Object obj)
 Destroys a UnityObject safely. More...
 
static bool IsUnityNull (object value)
 Checks if the object is null or marked for cleanup in Unity. More...
 
static bool IsUnityNull (Object value)
 Checks if the object is null or marked for cleanup in Unity. Overloaded to make sure we don't perform unnecessary checks if the argument is a Unity object. More...
 
static TTarget NullCoalesce< TTarget, TValue > (ref TTarget target, TValue value)
 Null-coalescing for Unity objects More...
 

Detailed Description

Provides static helper methods for Unity Objects.

Member Function Documentation

◆ IsUnityNull() [1/2]

static bool Megapop.MegaCore.UnityUtil.IsUnityNull ( object  value)
inlinestatic

Checks if the object is null or marked for cleanup in Unity.

◆ IsUnityNull() [2/2]

static bool Megapop.MegaCore.UnityUtil.IsUnityNull ( Object  value)
inlinestatic

Checks if the object is null or marked for cleanup in Unity. Overloaded to make sure we don't perform unnecessary checks if the argument is a Unity object.

◆ NullCoalesce< TTarget, TValue >()

static TTarget Megapop.MegaCore.UnityUtil.NullCoalesce< TTarget, TValue > ( ref TTarget  target,
TValue  value 
)
inlinestatic

Null-coalescing for Unity objects

Type Constraints
TTarget :Object 
TValue :TTarget 

◆ SafeDestroy()

static void Megapop.MegaCore.UnityUtil.SafeDestroy ( Object  obj)
inlinestatic

Destroys a UnityObject safely.

Parameters
objObject to be destroyed.

The documentation for this class was generated from the following file: