class
ScriptGameObjectWrapper
Inherits:
ScriptObjectWrapper
Provides a base class for all script object wrappers that wrap a GameObject object that may be passed as a shared pointer.
Public
Methods
GetBaseNativeObjectAsHandle
const HGameObject &GetBaseNativeObjectAsHandle() const
Returns the root base class of the wrapped native object as a handle.
IsNativeObjectValid
bool IsNativeObjectValid() const
Checks is the native object alive and valid.
staticGetOrCreateScriptObject
static MonoObject *GetOrCreateScriptObject(const HGameObject &nativeObject)
Attempts to retrieve an existing associated script object from the provided native object.
If one doesn't exist, a new script object and the associated script wrapper will be created.
Unlike GetOrCreateScriptObject implemented on TScriptGameObjectWrapper, this always accepts the object as a GameObject, and needs to perform type lookup to get the exact script wrapper type.
staticGetScriptObjectWrapper
static ScriptGameObjectWrapper *GetScriptObjectWrapper(const ScriptTypeMetaData &wrapperMetaData, MonoObject *scriptObject)
Returns the script object wrapper associated with the provided script object, and wrapped by a wrapper that owns the provided meta-data.
Protected
Fields
mNativeObjectStrongHandle
HGameObject mNativeObjectStrongHandle