Class EngineObject¶
Namespace: Apogee.Reflection
Assembly: Apogee.Reflection.dll
The base class of everything scripts can hold. Every object has a partial and marked
public abstract class EngineObject
Inheritance¶
Derived¶
AssetLibrary, AudioBus, AudioSound, AudioSystem, AudioVoice, BodyDesc, CharacterController, Hitch, InputActionMap, InputActionRouter, ModelLibrary, NetConnection, NetSystem, PhysicsShape, PhysicsWorld, SettingsStore, SteamSystem, Tween, UiDataModel, UiElement, UiEvent, UiSystem, Vehicle, VehicleDesc, WheelDesc, World
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors¶
EngineObject()¶
protected EngineObject()
Properties¶
Class¶
What the registry knows about this object's class.
public abstract ClassInfo Class { get; }
Property Value¶
Handle¶
Null once the object is destroyed.
public SlotHandle Handle { get; }
Property Value¶
IsAdopted¶
True once the engine has taken the object over (put it in a world, a scene, a list it owns). An object a script creates is destroyed when the script no longer holds it, unless the engine adopted it.
public bool IsAdopted { get; }
Property Value¶
IsDestroyed¶
public bool IsDestroyed { get; }
Property Value¶
Methods¶
Adopt()¶
Takes the object over from the script that created it: it now lives until
public void Adopt()
Destroy()¶
Ends the object's life: its handle stops resolving, in scripts too. Does nothing when it is already destroyed.
public void Destroy()
OnDestroyed()¶
protected virtual void OnDestroyed()
TryGet(SlotHandle, out EngineObject)¶
Finds a live object by the handle a script holds.
public static bool TryGet(SlotHandle handle, out EngineObject item)
Parameters¶
handle SlotHandle
item EngineObject