Optimize UI code

This commit is contained in:
Wojtek Figat
2025-03-16 23:07:56 +01:00
parent cd4ace3f49
commit 54050685d7
3 changed files with 6 additions and 7 deletions

View File

@@ -23,11 +23,11 @@ MMethod* UICanvas_EndPlay = nullptr;
MMethod* UICanvas_ParentChanged = nullptr;
#define UICANVAS_INVOKE(event) \
auto instance = GetManagedInstance(); \
if (instance) \
auto* managed = GetManagedInstance(); \
if (managed) \
{ \
MObject* exception = nullptr; \
UICanvas_##event->Invoke(instance, nullptr, &exception); \
UICanvas_##event->Invoke(managed, nullptr, &exception); \
if (exception) \
{ \
MException ex(exception); \