This commit is contained in:
Wojtek Figat
2021-02-07 20:19:10 +01:00
parent 5768eefe49
commit 04bb83fe31
2 changed files with 13 additions and 9 deletions

View File

@@ -17,13 +17,17 @@ MMethod* UICanvas_OnDisable = nullptr;
MMethod* UICanvas_EndPlay = nullptr;
#define UICANVAS_INVOKE(event) \
MonoObject* exception = nullptr; \
UICanvas_##event->Invoke(GetManagedInstance(), nullptr, &exception); \
if (exception) \
{ \
MException ex(exception); \
ex.Log(LogType::Error, TEXT("UICanvas::" #event)); \
}
auto instance = GetManagedInstance(); \
if (instance) \
{ \
MonoObject* exception = nullptr; \
UICanvas_##event->Invoke(instance, nullptr, &exception); \
if (exception) \
{ \
MException ex(exception); \
ex.Log(LogType::Error, TEXT("UICanvas::" #event)); \
} \
}
UICanvas::UICanvas(const SpawnParams& params)
: Actor(params)