Optimize UI code
This commit is contained in:
@@ -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); \
|
||||
|
||||
Reference in New Issue
Block a user