Modifier

Partager via


UnityObjectExtensions Class

Definition

Extension methods for Unity's Object class

public ref class UnityObjectExtensions abstract sealed
public static class UnityObjectExtensions
type UnityObjectExtensions = class
Public Module UnityObjectExtensions
Inheritance
UnityObjectExtensions

Methods

DestroyObject(Object, Single)

Destroys a Unity object appropriately depending if running in edit or play mode.

DontDestroyOnLoad(Object)

Enable Unity objects to skip "DontDestroyOnLoad" when editor isn't playing so test runner passes.

IsNotNull<T>(T)

Tests if an interface is null, taking potential UnityEngine.Object derived class implementers into account which require their overridden operators to be called.

IsNull<T>(T)

Tests if an interface is null, taking potential UnityEngine.Object derived class implementers into account which require their overridden operators to be called.

TryGetMonoBehaviour<T>(T, MonoBehaviour)

Properly checks an interface for null and returns the MonoBehaviour implementing it.

Applies to