class
GameObjectHandle
A handle that can point to various types of game objects.
It primarily keeps track if the object is still alive, so anything still referencing it doesn't accidentally use it.
Public
Constructors
GameObjectHandle
Methods
IsDestroyed
Returns true if the object the handle is pointing to has been destroyed.
- checkQueued
- Game objects can be queued for destruction but not actually destroyed yet, and still accessible. If this is false this method will return true only if the object is completely inaccessible (fully destroyed). If this is true this method will return true if object is completely inaccessible or if it is just queued for destruction.
IsValid
Returns true if the handle points to a non-null object and the object is not queued for destruction.
GetId
Returns the globally unique ID of the object the handle is referencing.
staticGetRttiStatic
Operators
Internal
Methods
ClearObjectInstanceData
Clears the handle so it doesn't point to any object.
Note this will affect any other handles sharing the handle data.
SetObjectInstanceData
Updates the handle so it points to the provided object.
Note this will affect any other handles sharing the handle data.
SetObjectInstanceData
Updates the handle so it points to the same object as the provided object.
Compared to the other overload of this method, this one has the advantage that its able to handle objects have been destroyed. The handle data will remain to be valid in case the object is later resurrected.
Note this will affect any other handles sharing the handle data.