Scripting API

Object

class in UnityEngine · UnityEngine.CoreModule

17 of 19 of Unity's membersUnity's documentation
In Tassix

Base class for all engine objects. Wraps a native handle and implements Unity's "fake null": once the native object is destroyed (or if it never existed, as with new MonoBehaviour()), the managed object compares equal to null. is null, ?. and ?? bypass this, as in Unity.

Constructors 1

Properties 2

HideFlags hideFlags { get; set; }

Whether it's saved, shown and editable in the editor (recorded; Tassix doesn't act on it yet).

string name { get; set; }

Methods 14

static void Destroy(Object? obj)
static void Destroy(Object? obj, float t)
static void DestroyImmediate(Object? obj)
static void DestroyImmediate(Object? obj, bool allowDestroyingAssets)

Destroys obj immediately.

Destroys obj immediately; assets aren't protected here, so the flag changes nothing.

static void DestroyObject(Object? obj)
static void DestroyObject(Object? obj, float t)

Destroy's old name, still in Unity's API.

static void DontDestroyOnLoad(Object target)

Moves a root object (or a component's root object) to the DontDestroyOnLoad scene.

bool Equals(object? other)
static T? FindAnyObjectByType<T>()
static T? FindAnyObjectByType<T>(FindObjectsInactive findObjectsInactive)
static Object? FindAnyObjectByType(Type type)
static Object? FindAnyObjectByType(Type type, FindObjectsInactive findObjectsInactive)
static T? FindFirstObjectByType<T>()
static T? FindFirstObjectByType<T>(FindObjectsInactive findObjectsInactive)
static Object? FindFirstObjectByType(Type type)
static Object? FindFirstObjectByType(Type type, FindObjectsInactive findObjectsInactive)
static T? FindObjectOfType<T>()
static T? FindObjectOfType<T>(bool includeInactive)
static Object? FindObjectOfType(Type type)
static Object? FindObjectOfType(Type type, bool includeInactive)
static T[] FindObjectsByType<T>()
static T[] FindObjectsByType<T>(FindObjectsInactive findObjectsInactive)
static Object[] FindObjectsByType(Type type)
static Object[] FindObjectsByType(Type type, FindObjectsInactive findObjectsInactive)
static T[] FindObjectsByType<T>(FindObjectsSortMode sortMode)
static T[] FindObjectsByType<T>(FindObjectsInactive findObjectsInactive, FindObjectsSortMode sortMode)
static Object[] FindObjectsByType(Type type, FindObjectsSortMode sortMode)
static Object[] FindObjectsByType(Type type, FindObjectsInactive findObjectsInactive, FindObjectsSortMode sortMode)

Active objects of the type, in no particular order (Unity 6.5's form).

static T[] FindObjectsOfType<T>()
static T[] FindObjectsOfType<T>(bool includeInactive)
static Object[] FindObjectsOfType(Type type)
static Object[] FindObjectsOfType(Type type, bool includeInactive)
int GetHashCode()
int GetInstanceID()
static Object Instantiate(Object original)
static Object Instantiate(Object original, Transform? parent)
static Object Instantiate(Object original, Transform? parent, bool instantiateInWorldSpace)
static Object Instantiate(Object original, Vector3 position, Quaternion rotation)
static Object Instantiate(Object original, Vector3 position, Quaternion rotation, Transform? parent)
static T Instantiate<T>(T original)
static T Instantiate<T>(T original, Transform? parent)
static T Instantiate<T>(T original, Transform? parent, bool worldPositionStays)
static T Instantiate<T>(T original, Vector3 position, Quaternion rotation)
static T Instantiate<T>(T original, Vector3 position, Quaternion rotation, Transform? parent)

Destroys obj after the current phase (or after t seconds).

string ToString()

Operators 3

static implicit operator bool(Object? exists)
static bool operator !=(Object? x, Object? y)
static bool operator ==(Object? x, Object? y)

Not in Tassix yet 2

GetEntityId InstantiateAsync

Checked against Unity

Conformance scenarios that exercise it, recorded in Unity and compared event by event.