Added: ScriptingObject* TryFindObject(MClass* mclass), Allow you from c++ to use MAssembly GetBinaryModuleGame, and get a monoobject from a class, monoobject is needed later to Invoke a method from the class.

This commit is contained in:
Preben Eriksen
2022-10-11 10:45:28 +02:00
parent f237d424fa
commit 2efc97b64f
2 changed files with 25 additions and 0 deletions

View File

@@ -144,6 +144,14 @@ public:
/// <returns>The found object or null if missing.</returns>
static ScriptingObject* FindObject(Guid id, MClass* type = nullptr);
/// <summary>
/// Tries to find the object by the given class.
/// </summary>
/// <returns>The found object or null if missing.</returns>
static ScriptingObject* TryFindObject(MClass* type = nullptr);
/// <summary>
/// Tries to find the object by the given identifier.
/// </summary>