_dotnet events

This commit is contained in:
2024-04-03 20:42:37 +03:00
parent 91a6450c94
commit 75d83a2ef3
4 changed files with 98 additions and 9 deletions

View File

@@ -872,6 +872,13 @@ void VisualScriptExecutor::ProcessGroupFunction(Box* boxBase, Node* node, Value&
// Find event binding callback
auto eventBinder = ScriptingEvents::EventsTable.TryGet(Pair<ScriptingTypeHandle, StringView>(eventType, eventName));
if (!eventBinder)
{
const StringAnsiView eventNameAnsi(node->Values[1]);
auto managedEvent = eventType.GetClass()->GetEvent(eventNameAnsi.GetText());
//eventBinder = (void(**)(ScriptingObject*, void*, bool))managedEvent;
}
if (!eventBinder)
{
LOG(Error, "Cannot bind to missing event {0} from type {1}.", eventName, eventTypeName);