Fixed Script Event registration going to the incorrect Behavior Context

Signed-off-by: lsemp3d <58790905+lsemp3d@users.noreply.github.com>
This commit is contained in:
lsemp3d
2022-02-17 11:37:20 -08:00
parent a3e33f0c4f
commit 1ed513d782
3 changed files with 3 additions and 2 deletions
@@ -115,7 +115,7 @@ namespace ScriptEvents
m_maxVersion = definition.GetVersion();
}
AZ::BehaviorContextBus::Broadcast(&AZ::BehaviorContextBus::Events::OnAddEBus, m_busName.c_str(), bus);
AZ::BehaviorContextBus::Event(behaviorContext, &AZ::BehaviorContextBus::Events::OnAddEBus, m_busName.c_str(), bus);
m_scriptEventBindings[m_assetId] = AZStd::make_unique<ScriptEventBinding>(behaviorContext, m_busName.c_str(), definition.GetAddressType());
ScriptEventNotificationBus::Event(m_assetId, &ScriptEventNotifications::OnRegistered, definition);