Provides static helper methods for Unity Objects.
More...
Provides static helper methods for Unity Objects.
◆ 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
-
obj | Object to be destroyed. |
The documentation for this class was generated from the following file:
- source/com.megapop.megacore/package/Runtime/Utility/UnityUtil.cs