diff --git a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h index 0f7470eb39..93c7cb1ccc 100644 --- a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h +++ b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h @@ -1337,6 +1337,7 @@ namespace AZ // EBusInterface settings static const EBusAddressPolicy AddressPolicy = EBusAddressPolicy::ById; typedef BehaviorContext* BusIdType; + using MutexType = AZStd::recursive_mutex; ////////////////////////////////////////////////////////////////////////// /// Called when a new global method is reflected in behavior context or removed from it diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/LuaMaterialFunctor.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/LuaMaterialFunctor.cpp index 7eedb82ecc..8e949f594f 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/LuaMaterialFunctor.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/LuaMaterialFunctor.cpp @@ -39,7 +39,7 @@ namespace AZ // [GFX TODO][ATOM-13648] Add local system allocator to material system // ScriptContext creates a new allocator if null (default) is passed in. // Temporarily using system allocator for preventing hitting the max allocator number. - m_scriptContext = AZStd::make_unique(ScriptContextIds::DefaultScriptContextId, &AZ::AllocatorInstance::Get()); + m_scriptContext = AZStd::make_unique(AZ_CRC_CE("MaterialFunctor"), &AZ::AllocatorInstance::Get()); m_sriptBehaviorContext = AZStd::make_unique(); ReflectScriptContext(m_sriptBehaviorContext.get()); diff --git a/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventRegistration.cpp b/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventRegistration.cpp index 35468d743b..2e56fb2efa 100644 --- a/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventRegistration.cpp +++ b/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventRegistration.cpp @@ -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(behaviorContext, m_busName.c_str(), definition.GetAddressType()); ScriptEventNotificationBus::Event(m_assetId, &ScriptEventNotifications::OnRegistered, definition);