Browse Source

replace EBUS macros

Signed-off-by: greerdv <[email protected]>
greerdv 2 years ago
parent
commit
f0115d9548
50 changed files with 261 additions and 208 deletions
  1. 2 2
      Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp
  2. 26 21
      Code/Framework/AzCore/AzCore/Component/Entity.cpp
  3. 1 1
      Code/Framework/AzCore/AzCore/Component/EntityBus.h
  4. 1 1
      Code/Framework/AzCore/AzCore/Component/EntityUtils.cpp
  5. 10 9
      Code/Framework/AzCore/AzCore/Debug/Trace.cpp
  6. 1 1
      Code/Framework/AzCore/AzCore/Module/Module.cpp
  7. 2 1
      Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h
  8. 1 1
      Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp
  9. 1 1
      Code/Framework/AzCore/AzCore/Script/ScriptProperty.cpp
  10. 4 3
      Code/Framework/AzCore/AzCore/Script/ScriptSystemComponent.cpp
  11. 2 2
      Code/Framework/AzCore/AzCore/Serialization/DataPatch.cpp
  12. 3 3
      Code/Framework/AzCore/AzCore/Serialization/DynamicSerializableField.cpp
  13. 4 2
      Code/Framework/AzCore/AzCore/Serialization/ObjectStream.cpp
  14. 4 4
      Code/Framework/AzCore/AzCore/Serialization/SerializationUtils.cpp
  15. 1 1
      Code/Framework/AzCore/AzCore/Slice/SliceAssetHandler.cpp
  16. 5 3
      Code/Framework/AzCore/AzCore/Slice/SliceComponent.cpp
  17. 6 4
      Code/Framework/AzCore/AzCore/Slice/SliceSystemComponent.cpp
  18. 3 3
      Code/Framework/AzCore/AzCore/UserSettings/UserSettings.cpp
  19. 4 4
      Code/Framework/AzCore/AzCore/UserSettings/UserSettingsComponent.cpp
  20. 1 1
      Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/Debug/Trace_WinAPI.cpp
  21. 4 4
      Code/Framework/AzCore/Tests/Components.cpp
  22. 1 1
      Code/Framework/AzCore/Tests/DLLMainTest.cpp
  23. 28 28
      Code/Framework/AzCore/Tests/EBus.cpp
  24. 2 1
      Code/Framework/AzCore/Tests/EntityTests.cpp
  25. 1 1
      Code/Framework/AzCore/Tests/Module.cpp
  26. 11 11
      Code/Framework/AzCore/Tests/Script.cpp
  27. 3 2
      Code/Framework/AzFramework/AzFramework/Application/Application.cpp
  28. 10 8
      Code/Framework/AzFramework/AzFramework/Asset/AssetCatalog.cpp
  29. 2 1
      Code/Framework/AzFramework/AzFramework/Asset/AssetSystemComponent.cpp
  30. 5 4
      Code/Framework/AzFramework/AzFramework/Asset/GenericAssetHandler.h
  31. 17 11
      Code/Framework/AzFramework/AzFramework/Components/TransformComponent.cpp
  32. 6 6
      Code/Framework/AzFramework/AzFramework/Entity/GameEntityContextComponent.cpp
  33. 11 11
      Code/Framework/AzFramework/AzFramework/Network/AssetProcessorConnection.cpp
  34. 3 2
      Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp
  35. 9 4
      Code/Framework/AzFramework/AzFramework/Script/ScriptRemoteDebugging.cpp
  36. 9 9
      Code/Framework/AzFramework/Platform/Android/AzFramework/Application/Application_Android.cpp
  37. 4 4
      Code/Framework/AzFramework/Platform/Windows/AzFramework/Application/Application_Windows.cpp
  38. 1 1
      Code/Framework/AzFramework/Tests/EntityContext.cpp
  39. 1 1
      Gems/CrashReporting/Code/Source/GameCrashHandler.cpp
  40. 1 1
      Gems/ImGui/Code/Source/ImGuiManager.cpp
  41. 2 1
      Gems/LmbrCentral/Code/Source/Builders/TranslationBuilder/TranslationBuilderComponent.cpp
  42. 2 1
      Gems/LmbrCentral/Code/Source/LmbrCentral.cpp
  43. 2 1
      Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp
  44. 1 1
      Gems/LmbrCentral/Code/Source/Scripting/EditorLookAtComponent.cpp
  45. 5 3
      Gems/LmbrCentral/Code/Source/Scripting/SimpleStateComponent.cpp
  46. 7 5
      Gems/LmbrCentral/Code/Source/Scripting/SpawnerComponent.cpp
  47. 6 6
      Gems/LmbrCentral/Code/Source/Scripting/TagComponent.cpp
  48. 23 9
      Gems/LmbrCentral/Code/Source/Shape/CompoundShapeComponent.cpp
  49. 1 1
      Gems/LmbrCentral/Code/include/LmbrCentral/Ai/NavigationComponentBus.h
  50. 1 1
      Gems/LmbrCentral/Code/include/LmbrCentral/Scripting/TagComponentBus.h

+ 2 - 2
Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp

@@ -1426,7 +1426,7 @@ namespace AZ
         AZ_PROFILE_SCOPE(System, "Component application tick");
 
         SystemTickBus::ExecuteQueuedEvents();
-        EBUS_EVENT(SystemTickBus, OnSystemTick);
+        SystemTickBus::Broadcast(&SystemTickBus::Events::OnSystemTick);
     }
 
     bool ComponentApplication::ShouldAddSystemComponent(AZ::ComponentDescriptor* descriptor)
@@ -1456,7 +1456,7 @@ namespace AZ
         for (const Uuid& componentId : GetRequiredSystemComponents())
         {
             ComponentDescriptor* componentDescriptor = nullptr;
-            EBUS_EVENT_ID_RESULT(componentDescriptor, componentId, ComponentDescriptorBus, GetDescriptor);
+            ComponentDescriptorBus::EventResult(componentDescriptor, componentId, &ComponentDescriptorBus::Events::GetDescriptor);
             if (!componentDescriptor)
             {
                 AZ_Error("Module", false, "Failed to add system component required by application. No component descriptor found for: %s",

+ 26 - 21
Code/Framework/AzCore/AzCore/Component/Entity.cpp

@@ -113,8 +113,8 @@ namespace AZ
 
         if (m_state == State::Init)
         {
-            EBUS_EVENT(EntitySystemBus, OnEntityDestruction, m_id);
-            EBUS_EVENT_ID(m_id, EntityBus, OnEntityDestruction, m_id);
+            EntitySystemBus::Broadcast(&EntitySystemBus::Events::OnEntityDestruction, m_id);
+            EntityBus::Event(m_id, &EntityBus::Events::OnEntityDestruction, m_id);
             AZ::ComponentApplicationRequests* componentApplication = AZ::Interface<AZ::ComponentApplicationRequests>::Get();
             if (componentApplication != nullptr)
             {
@@ -132,8 +132,8 @@ namespace AZ
 
         if (m_state == State::Init)
         {
-            EBUS_EVENT(EntitySystemBus, OnEntityDestroyed, m_id);
-            EBUS_EVENT_ID(m_id, EntityBus, OnEntityDestroyed, m_id);
+            EntitySystemBus::Broadcast(&EntitySystemBus::Events::OnEntityDestroyed, m_id);
+            EntityBus::Event(m_id, &EntityBus::Events::OnEntityDestroyed, m_id);
             m_stateEvent.Signal(State::Destroying, State::Destroyed);
         }
     }
@@ -189,8 +189,8 @@ namespace AZ
 
         SetState(State::Init);
 
-        EBUS_EVENT_ID(m_id, EntityBus, OnEntityExists, m_id);
-        EBUS_EVENT(EntitySystemBus, OnEntityInitialized, m_id);
+        EntityBus::Event(m_id, &EntityBus::Events::OnEntityExists, m_id);
+        EntitySystemBus::Broadcast(&EntitySystemBus::Events::OnEntityInitialized, m_id);
     }
 
     void Entity::Activate()
@@ -215,8 +215,8 @@ namespace AZ
 
         SetState(State::Active);
 
-        EBUS_EVENT_ID(m_id, EntityBus, OnEntityActivated, m_id);
-        EBUS_EVENT(EntitySystemBus, OnEntityActivated, m_id);
+        EntityBus::Event(m_id, &EntityBus::Events::OnEntityActivated, m_id);
+        EntitySystemBus::Broadcast(&EntitySystemBus::Events::OnEntityActivated, m_id);
         AZ::ComponentApplicationRequests* componentApplication = AZ::Interface<AZ::ComponentApplicationRequests>::Get();
         if (componentApplication != nullptr)
         {
@@ -233,8 +233,8 @@ namespace AZ
         {
             componentApplication->SignalEntityDeactivated(this);
         }
-        EBUS_EVENT_ID(m_id, EntityBus, OnEntityDeactivated, m_id);
-        EBUS_EVENT(EntitySystemBus, OnEntityDeactivated, m_id);
+        EntityBus::Event(m_id, &EntityBus::Events::OnEntityDeactivated, m_id);
+        EntitySystemBus::Broadcast(&EntitySystemBus::Events::OnEntityDeactivated, m_id);
 
         AZ_Assert(m_state == State::Active, "Component should be in Active state to be Deactivated!");
         SetState(State::Deactivating);
@@ -285,7 +285,7 @@ namespace AZ
     Component* Entity::CreateComponent(const Uuid& componentTypeId)
     {
         Component* component = nullptr;
-        EBUS_EVENT_ID_RESULT(component, componentTypeId, ComponentDescriptorBus, CreateComponent);
+        ComponentDescriptorBus::EventResult(component, componentTypeId, &ComponentDescriptorBus::Events::CreateComponent);
         if (component)
         {
             if (!AddComponent(component))
@@ -298,7 +298,7 @@ namespace AZ
         else
         {
             const char* name = nullptr;
-            EBUS_EVENT_ID_RESULT(name, componentTypeId, ComponentDescriptorBus, GetName);
+            ComponentDescriptorBus::EventResult(name, componentTypeId, &ComponentDescriptorBus::Events::GetName);
             AZ_Assert(false, "Failed to create component: %s", (name ? name : componentTypeId.ToString<AZStd::string>().c_str()));
         }
 #endif // AZ_ENABLE_TRACING
@@ -358,7 +358,7 @@ namespace AZ
         ComponentDescriptor::DependencyArrayType provided;
         ComponentDescriptor::DependencyArrayType incompatible;
         ComponentDescriptor* componentDescriptor = nullptr;
-        EBUS_EVENT_ID_RESULT(componentDescriptor, componentTypeId, ComponentDescriptorBus, GetDescriptor);
+        ComponentDescriptorBus::EventResult(componentDescriptor, componentTypeId, &ComponentDescriptorBus::Events::GetDescriptor);
         if (!componentDescriptor)
         {
             return false;
@@ -373,7 +373,8 @@ namespace AZ
                 provided.clear();
 
                 ComponentDescriptor* subComponentDescriptor = nullptr;
-                EBUS_EVENT_ID_RESULT(subComponentDescriptor, (*componentIt)->RTTI_GetType(), ComponentDescriptorBus, GetDescriptor);
+                ComponentDescriptorBus::EventResult(
+                    subComponentDescriptor, (*componentIt)->RTTI_GetType(), &ComponentDescriptorBus::Events::GetDescriptor);
                 AZ_Assert(subComponentDescriptor, "Component class %s descriptor is not created! It must be before you can use it!", (*componentIt)->RTTI_GetTypeName());
                 subComponentDescriptor->GetProvidedServices(provided, (*componentIt));
                 for (auto providedIt = provided.begin(); providedIt != provided.end(); ++providedIt)
@@ -403,7 +404,8 @@ namespace AZ
             {
                 incompatible.clear();
                 ComponentDescriptor* subComponentDescriptor = nullptr;
-                EBUS_EVENT_ID_RESULT(subComponentDescriptor, (*componentIt)->RTTI_GetType(), ComponentDescriptorBus, GetDescriptor);
+                ComponentDescriptorBus::EventResult(
+                    subComponentDescriptor, (*componentIt)->RTTI_GetType(), &ComponentDescriptorBus::Events::GetDescriptor);
                 AZ_Assert(subComponentDescriptor, "Component class %s descriptor is not created! It must be before you can use it!", (*componentIt)->RTTI_GetTypeName());
                 subComponentDescriptor->GetIncompatibleServices(incompatible, (*componentIt));
                 for (auto incompatibleIt = incompatible.begin(); incompatibleIt != incompatible.end(); ++incompatibleIt)
@@ -436,7 +438,8 @@ namespace AZ
             {
                 provided.clear();
                 ComponentDescriptor* subComponentDescriptor = nullptr;
-                EBUS_EVENT_ID_RESULT(subComponentDescriptor, (*componentIt)->RTTI_GetType(), ComponentDescriptorBus, GetDescriptor);
+                ComponentDescriptorBus::EventResult(
+                    subComponentDescriptor, (*componentIt)->RTTI_GetType(), &ComponentDescriptorBus::Events::GetDescriptor);
                 AZ_Assert(subComponentDescriptor, "Component class %s descriptor is not created! It must be before you can use it!", (*componentIt)->RTTI_GetTypeName());
                 subComponentDescriptor->GetProvidedServices(provided, (*componentIt));
                 for (auto providedIt = provided.begin(); providedIt != provided.end(); ++providedIt)
@@ -536,7 +539,7 @@ namespace AZ
         AZ_Assert(component->GetEntity() == this, "Component belongs to a different entity!");
         ComponentDescriptor::DependencyArrayType provided;
         ComponentDescriptor* componentDescriptor = nullptr;
-        EBUS_EVENT_ID_RESULT(componentDescriptor, component->RTTI_GetType(), ComponentDescriptorBus, GetDescriptor);
+        ComponentDescriptorBus::EventResult(componentDescriptor, component->RTTI_GetType(), &ComponentDescriptorBus::Events::GetDescriptor);
         AZ_Assert(componentDescriptor, "Component class %s descriptor is not created! It must be before you can use it!", component->RTTI_GetTypeName());
         componentDescriptor->GetProvidedServices(provided, component);
         if (!provided.empty())
@@ -550,7 +553,8 @@ namespace AZ
                 }
                 ComponentDescriptor::DependencyArrayType subProvided;
                 ComponentDescriptor* subComponentDescriptor = nullptr;
-                EBUS_EVENT_ID_RESULT(subComponentDescriptor, (*componentIt)->RTTI_GetType(), ComponentDescriptorBus, GetDescriptor);
+                ComponentDescriptorBus::EventResult(
+                    subComponentDescriptor, (*componentIt)->RTTI_GetType(), &ComponentDescriptorBus::Events::GetDescriptor);
                 AZ_Assert(componentDescriptor, "Component class %s descriptor is not created! It must be before you can use it!", (*componentIt)->RTTI_GetTypeName());
                 subComponentDescriptor->GetProvidedServices(subProvided, (*componentIt));
                 for (auto subProvidedIt = subProvided.begin(); subProvidedIt != subProvided.end(); ++subProvidedIt)
@@ -583,7 +587,8 @@ namespace AZ
                 }
                 ComponentDescriptor::DependencyArrayType required;
                 ComponentDescriptor* subComponentDescriptor = nullptr;
-                EBUS_EVENT_ID_RESULT(subComponentDescriptor, (*componentIt)->RTTI_GetType(), ComponentDescriptorBus, GetDescriptor);
+                ComponentDescriptorBus::EventResult(
+                    subComponentDescriptor, (*componentIt)->RTTI_GetType(), &ComponentDescriptorBus::Events::GetDescriptor);
                 AZ_Assert(subComponentDescriptor, "Component class %s descriptor is not created! It must be before you can use it!", (*componentIt)->RTTI_GetTypeName());
                 subComponentDescriptor->GetRequiredServices(required, (*componentIt));
                 for (auto requiredIt = required.begin(); requiredIt != required.end(); ++requiredIt)
@@ -667,8 +672,8 @@ namespace AZ
 
     void Entity::OnNameChanged() const
     {
-        EBUS_EVENT_ID(GetId(), EntityBus, OnEntityNameChanged, m_name);
-        EBUS_EVENT(EntitySystemBus, OnEntityNameChanged, GetId(), m_name);
+        EntityBus::Event(GetId(), &EntityBus::Events::OnEntityNameChanged, m_name);
+        EntitySystemBus::Broadcast(&EntitySystemBus::Events::OnEntityNameChanged, GetId(), m_name);
     }
 
     bool Entity::CanAddRemoveComponents() const

+ 1 - 1
Code/Framework/AzCore/AzCore/Component/EntityBus.h

@@ -105,7 +105,7 @@ namespace AZ
                 EBusConnectionPolicy<Bus>::Connect(busPtr, context, handler, connectLock, id);
 
                 Entity* entity = nullptr;
-                EBUS_EVENT_RESULT(entity, AZ::ComponentApplicationBus, FindEntity, id);
+                AZ::ComponentApplicationBus::BroadcastResult(entity, &AZ::ComponentApplicationBus::Events::FindEntity, id);
                 if (entity)
                 {
                     const AZ::Entity::State entityState = entity->GetState();

+ 1 - 1
Code/Framework/AzCore/AzCore/Component/EntityUtils.cpp

@@ -104,7 +104,7 @@ namespace AZ::EntityUtils
     SerializeContext* GetApplicationSerializeContext()
     {
         SerializeContext* context = nullptr;
-        EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext);
+        ComponentApplicationBus::BroadcastResult(context, &ComponentApplicationBus::Events::GetSerializeContext);
         return context;
     }
 

+ 10 - 9
Code/Framework/AzCore/AzCore/Debug/Trace.cpp

@@ -336,7 +336,7 @@ namespace AZ::Debug
         va_end(mark);
 
         TraceMessageResult result;
-        EBUS_EVENT_RESULT(result, TraceMessageBus, OnPreAssert, fileName, line, funcName, message);
+        TraceMessageBus::BroadcastResult(result, &TraceMessageBus::Events::OnPreAssert, fileName, line, funcName, message);
 
         if (GetAlwaysPrintCallstack())
         {
@@ -359,7 +359,7 @@ namespace AZ::Debug
             azstrcat(message, g_maxMessageLength, "\n");
             Output(g_dbgSystemWnd, message);
 
-            EBUS_EVENT_RESULT(result, TraceMessageBus, OnAssert, message);
+            TraceMessageBus::BroadcastResult(result, &TraceMessageBus::Events::OnAssert, message);
             if (result.m_value)
             {
                 Output(g_dbgSystemWnd, "==================================================================\n");
@@ -403,7 +403,8 @@ namespace AZ::Debug
             else if (currentLevel == assertLevel_nativeUI)
             {
                 AZ::NativeUI::AssertAction buttonResult;
-                EBUS_EVENT_RESULT(buttonResult, AZ::NativeUI::NativeUIRequestBus, DisplayAssertDialog, dialogBoxText);
+                AZ::NativeUI::NativeUIRequestBus::BroadcastResult(
+                    buttonResult, &AZ::NativeUI::NativeUIRequestBus::Events::DisplayAssertDialog, dialogBoxText);
                 switch (buttonResult)
                 {
                 case AZ::NativeUI::AssertAction::BREAK:
@@ -468,7 +469,7 @@ namespace AZ::Debug
         va_end(mark);
 
         TraceMessageResult result;
-        EBUS_EVENT_RESULT(result, TraceMessageBus, OnPreError, window, fileName, line, funcName, message);
+        TraceMessageBus::BroadcastResult(result, &TraceMessageBus::Events::OnPreError, window, fileName, line, funcName, message);
         if (result.m_value)
         {
             g_alreadyHandlingAssertOrFatal = false;
@@ -481,7 +482,7 @@ namespace AZ::Debug
         azstrcat(message, g_maxMessageLength, "\n");
         Output(window, message);
 
-        EBUS_EVENT_RESULT(result, TraceMessageBus, OnError, window, message);
+        TraceMessageBus::BroadcastResult(result, &TraceMessageBus::Events::OnError, window, message);
         Output(window, "==================================================================\n");
         if (result.m_value)
         {
@@ -512,7 +513,7 @@ namespace AZ::Debug
         va_end(mark);
 
         TraceMessageResult result;
-        EBUS_EVENT_RESULT(result, TraceMessageBus, OnPreWarning, window, fileName, line, funcName, message);
+        TraceMessageBus::BroadcastResult(result, &TraceMessageBus::Events::OnPreWarning, window, fileName, line, funcName, message);
         if (result.m_value)
         {
             return;
@@ -524,7 +525,7 @@ namespace AZ::Debug
         azstrcat(message, g_maxMessageLength, "\n");
         Output(window, message);
 
-        EBUS_EVENT_RESULT(result, TraceMessageBus, OnWarning, window, message);
+        TraceMessageBus::BroadcastResult(result, &TraceMessageBus::Events::OnWarning, window, message);
         Output(window, "==================================================================\n");
     }
 
@@ -548,7 +549,7 @@ namespace AZ::Debug
         va_end(mark);
 
         TraceMessageResult result;
-        EBUS_EVENT_RESULT(result, TraceMessageBus, OnPrintf, window, message);
+        TraceMessageBus::BroadcastResult(result, &TraceMessageBus::Events::OnPrintf, window, message);
         if (result.m_value)
         {
             return;
@@ -576,7 +577,7 @@ namespace AZ::Debug
             // would likely just lead to even more exceptions.
 
             TraceMessageResult result;
-            EBUS_EVENT_RESULT(result, TraceMessageBus, OnOutput, window, message);
+            TraceMessageBus::BroadcastResult(result, &TraceMessageBus::Events::OnOutput, window, message);
             if (result.m_value)
             {
                 return;

+ 1 - 1
Code/Framework/AzCore/AzCore/Module/Module.cpp

@@ -28,7 +28,7 @@ namespace AZ
         for (const ComponentDescriptor* descriptor : m_descriptors)
         {
             AZ_Warning("AZ::Module", descriptor, "Null module descriptor is being skipped (%s)", RTTI_GetType().ToString<AZStd::string>().c_str());
-            EBUS_EVENT(ComponentApplicationBus, RegisterComponentDescriptor, descriptor);
+            ComponentApplicationBus::Broadcast(&ComponentApplicationBus::Events::RegisterComponentDescriptor, descriptor);
         }
     }
 }

+ 2 - 1
Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h

@@ -4494,7 +4494,8 @@ namespace AZ
 
             CallFunction<R, Args...>::Member(m_functionPtr, *arguments[0].GetAsUnsafe<C*>(), arguments.data() + 1, result, AZStd::make_index_sequence<sizeof...(Args)>());
 
-            EBUS_EVENT_ID(((void*)(*arguments[0].GetAsUnsafe<C*>())), BehaviorObjectSignals, OnMemberMethodCalled, this);
+            BehaviorObjectSignals::Event(
+                (void*)(*arguments[0].GetAsUnsafe<C*>()), &BehaviorObjectSignals::Events::OnMemberMethodCalled, this);
 
             return true;
         }

+ 1 - 1
Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp

@@ -887,7 +887,7 @@ namespace AZ
                     lua_pushvalue(l, -4); // copy the value for set
                     lua_call(l, 2, 0);
 
-                   //EBUS_EVENT_ID(thisPtr, BehaviorObjectSignals, OnMemberMethodCalled, method);
+                    //BehaviorObjectSignals::Event(thisPtr, &BehaviorObjectSignals::Events::OnMemberMethodCalled, method);
                 }
             }
 

+ 1 - 1
Code/Framework/AzCore/AzCore/Script/ScriptProperty.cpp

@@ -147,7 +147,7 @@ namespace AZ
     {
         for (AZ::ScriptPropertyWatcher* watcher : m_watchers)
         {
-            EBUS_EVENT_ID(watcher, ScriptPropertyWatcherBus, OnObjectModified);
+            ScriptPropertyWatcherBus::Event(watcher, &ScriptPropertyWatcherBus::Events::OnObjectModified);
         }
     }
 

+ 4 - 3
Code/Framework/AzCore/AzCore/Script/ScriptSystemComponent.cpp

@@ -154,7 +154,7 @@ ScriptContext*  ScriptSystemComponent::AddContext(ScriptContext* context, int ga
         if (context->GetId() != ScriptContextIds::CryScriptContextId)
         {
             BehaviorContext* behaviorContext = nullptr;
-            EBUS_EVENT_RESULT(behaviorContext, ComponentApplicationBus, GetBehaviorContext);
+            ComponentApplicationBus::BroadcastResult(behaviorContext, &ComponentApplicationBus::Events::GetBehaviorContext);
             if (behaviorContext)
             {
                 context->BindTo(behaviorContext);
@@ -193,7 +193,7 @@ ScriptContext* ScriptSystemComponent::AddContextWithId(ScriptContextId id)
     {
         // Reflect script classes
         ComponentApplication* app = nullptr;
-        EBUS_EVENT_RESULT(app, ComponentApplicationBus, GetApplication);
+        ComponentApplicationBus::BroadcastResult(app, &ComponentApplicationBus::Events::GetApplication);
         if (app && app->GetDescriptor().m_enableScriptReflection)
         {
             if (app->GetBehaviorContext())
@@ -484,7 +484,8 @@ int ScriptSystemComponent::DefaultRequireHook(lua_State* lua, ScriptContext* con
     }
 
     Data::AssetId scriptId;
-    EBUS_EVENT_RESULT(scriptId, Data::AssetCatalogRequestBus, GetAssetIdByPath, filePath.c_str(), azrtti_typeid<ScriptAsset>(), false);
+    Data::AssetCatalogRequestBus::BroadcastResult(
+        scriptId, &Data::AssetCatalogRequestBus::Events::GetAssetIdByPath, filePath.c_str(), azrtti_typeid<ScriptAsset>(), false);
     if (!scriptId.IsValid())
     {
         lua_pushfstring(lua, "Module \"%s\" has not been registered with the Asset Database.", filePath.c_str());

+ 2 - 2
Code/Framework/AzCore/AzCore/Serialization/DataPatch.cpp

@@ -1761,7 +1761,7 @@ namespace AZ
 
         if (!context)
         {
-            EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext);
+            ComponentApplicationBus::BroadcastResult(context, &ComponentApplicationBus::Events::GetSerializeContext);
             if (!context)
             {
                 AZ_Error("Serialization", false, "Not serialize context provided! Failed to get component application default serialize context! ComponentApp is not started or input serialize context should not be null!");
@@ -1841,7 +1841,7 @@ namespace AZ
 
         if (!context)
         {
-            EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext);
+            ComponentApplicationBus::BroadcastResult(context, &ComponentApplicationBus::Events::GetSerializeContext);
             if (!context)
             {
                 AZ_Error("Serialization", false, "No serialize context provided! Failed to get component application default serialize context! ComponentApp is not started or input serialize context should not be null!");

+ 3 - 3
Code/Framework/AzCore/AzCore/Serialization/DynamicSerializableField.cpp

@@ -52,7 +52,7 @@ namespace AZ
             // that created our data and use that to query for the proper destructor info.
             if (!useContext)
             {
-                EBUS_EVENT_RESULT(useContext, ComponentApplicationBus, GetSerializeContext);
+                ComponentApplicationBus::BroadcastResult(useContext, &ComponentApplicationBus::Events::GetSerializeContext);
                 AZ_Error("DynamicSerializableField", useContext, "Can't find valid serialize context. Dynamic data cannot be deleted without it!");
             }
             if (useContext)
@@ -86,7 +86,7 @@ namespace AZ
         {
             if (!useContext)
             {
-                EBUS_EVENT_RESULT(useContext, ComponentApplicationBus, GetSerializeContext);
+                ComponentApplicationBus::BroadcastResult(useContext, &ComponentApplicationBus::Events::GetSerializeContext);
                 AZ_Error("DynamicSerializableField", useContext, "Can't find valid serialize context. Dynamic data cannot be deleted without it!");
             }
             if (useContext)
@@ -116,7 +116,7 @@ namespace AZ
 
         if (!useContext)
         {
-            EBUS_EVENT_RESULT(useContext, ComponentApplicationBus, GetSerializeContext);
+            ComponentApplicationBus::BroadcastResult(useContext, &ComponentApplicationBus::Events::GetSerializeContext);
             AZ_Error("DynamicSerializableField", useContext, "Can't find valid serialize context. Dynamic data cannot be compared without it!");
         }        
 

+ 4 - 2
Code/Framework/AzCore/AzCore/Serialization/ObjectStream.cpp

@@ -521,7 +521,8 @@ namespace AZ
                     overlaidNode.m_element.m_stream = &stream;
                     DataOverlayTarget data(&overlaidNode, m_sc, &m_errorLogger);
 
-                    EBUS_EVENT_ID(overlay.m_providerId, DataOverlayProviderBus, FillOverlayData, &data, overlay.m_dataToken);
+                    DataOverlayProviderBus::Event(
+                        overlay.m_providerId, &DataOverlayProviderBus::Events::FillOverlayData, &data, overlay.m_dataToken);
                     if (overlaidNode.GetNumSubElements() > 0)
                     {
                         AZ_Assert(overlaidNode.GetNumSubElements() == 1, "Only one node should ever be returned by the overlay provider!");
@@ -1569,7 +1570,8 @@ namespace AZ
             {
                 // Data overlays are only supported for non-root elements, which means we should have a valid class element.
                 DataOverlayInfo overlay;
-                EBUS_EVENT_ID_RESULT(overlay, DataOverlayInstanceId(objectPtr, classElement->m_typeId), DataOverlayInstanceBus, GetOverlayInfo);
+                DataOverlayInstanceBus::EventResult(
+                    overlay, DataOverlayInstanceId(objectPtr, classElement->m_typeId), &DataOverlayInstanceBus::Events::GetOverlayInfo);
                 if (overlay.m_providerId)
                 {
                     const SerializeContext::ClassData* overlayClassMetadata = m_sc->FindClassData(SerializeTypeInfo<DataOverlayInfo>::GetUuid());

+ 4 - 4
Code/Framework/AzCore/AzCore/Serialization/SerializationUtils.cpp

@@ -28,7 +28,7 @@ namespace AZ::Utils
 
         if (!context)
         {
-            EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext);
+            ComponentApplicationBus::BroadcastResult(context, &ComponentApplicationBus::Events::GetSerializeContext);
             AZ_Assert(context, "No serialize context");
         }
 
@@ -74,7 +74,7 @@ namespace AZ::Utils
 
         if (!context)
         {
-            EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext);
+            ComponentApplicationBus::BroadcastResult(context, &ComponentApplicationBus::Events::GetSerializeContext);
             AZ_Assert(context, "No serialize context");
         }
 
@@ -113,7 +113,7 @@ namespace AZ::Utils
 
         if (!context)
         {
-            EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext);
+            ComponentApplicationBus::BroadcastResult(context, &ComponentApplicationBus::Events::GetSerializeContext);
             AZ_Assert(context, "No serialize context");
         }
 
@@ -185,7 +185,7 @@ namespace AZ::Utils
 
         if (!context)
         {
-            EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext);
+            ComponentApplicationBus::BroadcastResult(context, &ComponentApplicationBus::Events::GetSerializeContext);
 
             if(!context)
             {

+ 1 - 1
Code/Framework/AzCore/AzCore/Slice/SliceAssetHandler.cpp

@@ -146,7 +146,7 @@ namespace AZ
         if (m_serializeContext == nullptr)
         {
             // use the default app serialize context
-            EBUS_EVENT_RESULT(m_serializeContext, ComponentApplicationBus, GetSerializeContext);
+            ComponentApplicationBus::BroadcastResult(m_serializeContext, &ComponentApplicationBus::Events::GetSerializeContext);
             if (!m_serializeContext)
             {
                 AZ_Error("Slices", false, "SliceAssetHandler: No serialize context provided! We will not be able to process Slice Asset type");

+ 5 - 3
Code/Framework/AzCore/AzCore/Slice/SliceComponent.cpp

@@ -2849,7 +2849,7 @@ namespace AZ
         if (!m_serializeContext)
         {
             // use the default app serialize context
-            EBUS_EVENT_RESULT(m_serializeContext, ComponentApplicationBus, GetSerializeContext);
+            ComponentApplicationBus::BroadcastResult(m_serializeContext, &ComponentApplicationBus::Events::GetSerializeContext);
             if (!m_serializeContext)
             {
                 AZ_Error("Slices", false, "SliceComponent: No serialize context provided! Failed to get component application default serialize context! ComponentApp is not started or SliceComponent serialize context should not be null!");
@@ -3076,14 +3076,16 @@ namespace AZ
             AZ_PROFILE_FUNCTION(AzCore);
 
             SliceComponent* sliceComponent = reinterpret_cast<SliceComponent*>(classPtr);
-            EBUS_EVENT(SliceAssetSerializationNotificationBus, OnWriteDataToSliceAssetEnd, *sliceComponent);
+            SliceAssetSerializationNotificationBus::Broadcast(
+                &SliceAssetSerializationNotificationBus::Events::OnWriteDataToSliceAssetEnd, *sliceComponent);
 
             // Broadcast OnSliceEntitiesLoaded for entities that are "new" to this slice.
             // We can't broadcast this event for instanced entities yet, since they don't exist until instantiation.
             if (!sliceComponent->GetNewEntities().empty())
             {
                 AZ_PROFILE_SCOPE(AzCore, "SliceComponentSerializationEvents::OnWriteEnd:OnSliceEntitiesLoaded");
-                EBUS_EVENT(SliceAssetSerializationNotificationBus, OnSliceEntitiesLoaded, sliceComponent->GetNewEntities());
+                SliceAssetSerializationNotificationBus::Broadcast(
+                    &SliceAssetSerializationNotificationBus::Events::OnSliceEntitiesLoaded, sliceComponent->GetNewEntities());
             }
         }
     };

+ 6 - 4
Code/Framework/AzCore/AzCore/Slice/SliceSystemComponent.cpp

@@ -57,10 +57,12 @@ namespace AZ
         }
 
         // Register with AssetCatalog
-        EBUS_EVENT(Data::AssetCatalogRequestBus, EnableCatalogForAsset, AZ::AzTypeInfo<AZ::SliceAsset>::Uuid());
-        EBUS_EVENT(Data::AssetCatalogRequestBus, AddExtension, "slice");
-        EBUS_EVENT(Data::AssetCatalogRequestBus, EnableCatalogForAsset, AZ::AzTypeInfo<AZ::DynamicSliceAsset>::Uuid());
-        EBUS_EVENT(Data::AssetCatalogRequestBus, AddExtension, "dynamicslice");
+        Data::AssetCatalogRequestBus::Broadcast(
+            &Data::AssetCatalogRequestBus::Events::EnableCatalogForAsset, AZ::AzTypeInfo<AZ::SliceAsset>::Uuid());
+        Data::AssetCatalogRequestBus::Broadcast(&Data::AssetCatalogRequestBus::Events::AddExtension, "slice");
+        Data::AssetCatalogRequestBus::Broadcast(
+            &Data::AssetCatalogRequestBus::Events::EnableCatalogForAsset, AZ::AzTypeInfo<AZ::DynamicSliceAsset>::Uuid());
+        Data::AssetCatalogRequestBus::Broadcast(&Data::AssetCatalogRequestBus::Events::AddExtension, "dynamicslice");
     }
 
     void SliceSystemComponent::Deactivate()

+ 3 - 3
Code/Framework/AzCore/AzCore/UserSettings/UserSettings.cpp

@@ -25,7 +25,7 @@ namespace AZ
         void AddSettings(UserSettings* settings, u32 settingsId, u32 groupId)
         {
             AZ_Warning("UserSettings", UserSettingsBus::GetNumOfEventHandlers(groupId) > 0, "There is no UserSettings handler for group %u, settings %u will not be tracked!", groupId, settingsId);
-            EBUS_EVENT_ID(groupId, UserSettingsBus, AddUserSettings, settingsId, settings);
+            UserSettingsBus::Event(groupId, &UserSettingsBus::Events::AddUserSettings, settingsId, settings);
         }
 
         //-------------------------------------------------------------------------
@@ -35,7 +35,7 @@ namespace AZ
         {
             // if we don't have any handlers exit
             AZStd::intrusive_ptr<UserSettings> ret;
-            EBUS_EVENT_ID_RESULT(ret, groupId, UserSettingsBus, FindUserSettings, settingsId);
+            UserSettingsBus::EventResult(ret, groupId, &UserSettingsBus::Events::FindUserSettings, settingsId);
             return ret;
         }
     }   // namespace UserSettingsInternal
@@ -46,7 +46,7 @@ namespace AZ
     bool UserSettings::Save(u32 providerId, const char* settingsPath, SerializeContext* sc)
     {
         bool settingsSaved = false;
-        EBUS_EVENT_ID_RESULT(settingsSaved, providerId, UserSettingsBus, Save, settingsPath, sc);
+        UserSettingsBus::EventResult(settingsSaved, providerId, &UserSettingsBus::Events::Save, settingsPath, sc);
         return settingsSaved;
     }
     //-------------------------------------------------------------------------

+ 4 - 4
Code/Framework/AzCore/AzCore/UserSettings/UserSettingsComponent.cpp

@@ -46,9 +46,9 @@ namespace AZ
     void UserSettingsComponent::Load()
     {
         AZStd::string settingsPath;
-        EBUS_EVENT_RESULT(settingsPath, UserSettingsFileLocatorBus, ResolveFilePath, m_providerId);
+        UserSettingsFileLocatorBus::BroadcastResult(settingsPath, &UserSettingsFileLocatorBus::Events::ResolveFilePath, m_providerId);
         SerializeContext* serializeContext = nullptr;
-        EBUS_EVENT_RESULT(serializeContext, ComponentApplicationBus, GetSerializeContext);
+        ComponentApplicationBus::BroadcastResult(serializeContext, &ComponentApplicationBus::Events::GetSerializeContext);
         AZ_Warning("UserSettings", serializeContext != nullptr, "Failed to retrieve the serialization context. User settings cannot be loaded.");
         if (!settingsPath.empty() && serializeContext != nullptr)
         {
@@ -60,9 +60,9 @@ namespace AZ
     void UserSettingsComponent::Save()
     {
         AZStd::string settingsPath;
-        EBUS_EVENT_RESULT(settingsPath, UserSettingsFileLocatorBus, ResolveFilePath, m_providerId);
+        UserSettingsFileLocatorBus::BroadcastResult(settingsPath, &UserSettingsFileLocatorBus::Events::ResolveFilePath, m_providerId);
         SerializeContext* serializeContext = nullptr;
-        EBUS_EVENT_RESULT(serializeContext, ComponentApplicationBus, GetSerializeContext);
+        ComponentApplicationBus::BroadcastResult(serializeContext, &ComponentApplicationBus::Events::GetSerializeContext);
         AZ_Warning("UserSettings", serializeContext != nullptr, "Failed to retrieve the serialization context. User settings cannot be stored.");
         if (!settingsPath.empty() && serializeContext != nullptr)
         {

+ 1 - 1
Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/Debug/Trace_WinAPI.cpp

@@ -207,7 +207,7 @@ namespace AZ::Debug
         Debug::Trace::Instance().PrintCallstack(nullptr, 0, ExceptionInfo->ContextRecord);
 
         bool result = false;
-        EBUS_EVENT_RESULT(result, Debug::TraceMessageBus, OnException, message);
+        Debug::TraceMessageBus::BroadcastResult(result, &Debug::TraceMessageBus::Events::OnException, message);
         if (result)
         {
             Debug::Trace::Instance().Output(nullptr, "==================================================================\n");

+ 4 - 4
Code/Framework/AzCore/Tests/Components.cpp

@@ -123,7 +123,7 @@ namespace UnitTest
             // This requires advanced knowledge of the EBus and it's NOT recommended as a schema for
             // generic functionality. You should just call TickBus::Handler::BusConnect(GetEntityId()); in place
             // make sure you are doing this from the main thread.
-            EBUS_QUEUE_FUNCTION(TickBus, &TickBus::Handler::BusConnect, this);
+            TickBus::QueueFunction(&TickBus::Handler::BusConnect, this);
             m_isActivated = true;
         }
         void Deactivate() override
@@ -219,7 +219,7 @@ namespace UnitTest
         AZ_TEST_ASSERT(entity->GetId() == oldID); // id should be unaffected.
 
                                                   // try to send a component message, since it's not active nobody should listen to it
-        EBUS_EVENT(SimpleComponentMessagesBus, DoA, 1);
+        SimpleComponentMessagesBus::Broadcast(&SimpleComponentMessagesBus::Events::DoA, 1);
         AZ_TEST_ASSERT(comp1->m_a == 0); // it should still be 0
 
                                          // activate
@@ -228,7 +228,7 @@ namespace UnitTest
         AZ_TEST_ASSERT(comp1->m_isActivated);
 
         // now the component should be active responsive to message
-        EBUS_EVENT(SimpleComponentMessagesBus, DoA, 1);
+        SimpleComponentMessagesBus::Broadcast(&SimpleComponentMessagesBus::Events::DoA, 1);
         AZ_TEST_ASSERT(comp1->m_a == 1);
 
         // Make sure its NOT possible to set the id of the entity after Activate
@@ -269,7 +269,7 @@ namespace UnitTest
         AZ_TEST_ASSERT(comp1->m_isActivated == false);
 
         // try to send a component message, since it's not active nobody should listen to it
-        EBUS_EVENT(SimpleComponentMessagesBus, DoA, 2);
+        SimpleComponentMessagesBus::Broadcast(&SimpleComponentMessagesBus::Events::DoA, 2);
         AZ_TEST_ASSERT(comp1->m_a == 1);
 
         // make sure we can remove components

+ 1 - 1
Code/Framework/AzCore/Tests/DLLMainTest.cpp

@@ -85,7 +85,7 @@ extern "C" AZ_DLL_EXPORT void DoTests()
 
     // Use the bus to fire a message on the bus to verify it works across modules
     AZ::EntityId hackEntityIdAddress((AZ::u64)address); // HACK to pass the address to another module, otherwise we need to create a common EBus
-    EBUS_EVENT(AZ::TransformNotificationBus, OnParentChanged, AZ::EntityId(), hackEntityIdAddress);
+    AZ::TransformNotificationBus::Broadcast(&AZ::TransformNotificationBus::Events::OnParentChanged, AZ::EntityId(), hackEntityIdAddress);
 }
 
 

+ 28 - 28
Code/Framework/AzCore/Tests/EBus.cpp

@@ -641,7 +641,7 @@ namespace UnitTest
         Bus::Broadcast(&Bus::Events::OnEvent);
         this->ValidateCalls(1);
 
-        EBUS_EVENT(Bus, OnEvent);
+        Bus::Broadcast(&Bus::Events::OnEvent);
         this->ValidateCalls(2);
     }
 
@@ -667,7 +667,7 @@ namespace UnitTest
         Bus::BroadcastReverse(&Bus::Events::OnEvent);
         this->ValidateCalls(1, false);
 
-        EBUS_EVENT_REVERSE(Bus, OnEvent);
+        Bus::BroadcastReverse(&Bus::Events::OnEvent);
         this->ValidateCalls(2, false);
     }
 
@@ -696,7 +696,7 @@ namespace UnitTest
         this->ValidateCalls(1);
 
         result = -1;
-        EBUS_EVENT_RESULT(result, Bus, OnEvent);
+        Bus::BroadcastResult(result, &Bus::Events::OnEvent);
         EXPECT_LT(0, result);
         this->ValidateCalls(2);
 
@@ -719,7 +719,7 @@ namespace UnitTest
         this->ValidateCalls(1, false);
 
         result = -1;
-        EBUS_EVENT_RESULT_REVERSE(result, Bus, OnEvent);
+        Bus::BroadcastResultReverse(result, &Bus::Events::OnEvent);
         EXPECT_LT(0, result);
         this->ValidateCalls(2, false);
 
@@ -1006,7 +1006,7 @@ namespace UnitTest
         Bus::ExecuteQueuedEvents();
         this->ValidateCalls(1);
 
-        EBUS_QUEUE_EVENT(Bus, OnEvent);
+        Bus::QueueBroadcast(&Bus::Events::OnEvent);
         this->ValidateCalls(1);
         Bus::ExecuteQueuedEvents();
         this->ValidateCalls(2);
@@ -1038,7 +1038,7 @@ namespace UnitTest
         Bus::ExecuteQueuedEvents();
         this->ValidateCalls(1, false);
 
-        EBUS_QUEUE_EVENT_REVERSE(Bus, OnEvent);
+        Bus::QueueBroadcastReverse(&Bus::Events::OnEvent);
         this->ValidateCalls(1, false);
         Bus::ExecuteQueuedEvents();
         this->ValidateCalls(2, false);
@@ -1673,24 +1673,24 @@ namespace UnitTest
             MyEventHandler meh0(0, 1);     /// <-- Bind to bus 0 and 1
 
             // Signal OnAction event on all buses
-            EBUS_EVENT(MyEventGroupBus, OnAction, 1.0f, 2.0f);
+            MyEventGroupBus::Broadcast(&MyEventGroupBus::Events::OnAction, 1.0f, 2.0f);
             EXPECT_EQ(2, meh0.actionCalls);
 
             // Signal OnSum event
-            EBUS_EVENT(MyEventGroupBus, OnSum, 2.0f, 5.0f);
+            MyEventGroupBus::Broadcast(&MyEventGroupBus::Events::OnSum, 2.0f, 5.0f);
             EXPECT_EQ(2, meh0.sumCalls);
 
             // Signal OnAction event on bus 0
-            EBUS_EVENT_ID(0, MyEventGroupBus, OnAction, 1.0f, 2.0f);
+            MyEventGroupBus::Event(0, &MyEventGroupBus::Events::OnAction, 1.0f, 2.0f);
             EXPECT_EQ(3, meh0.actionCalls);
 
             // Signal OnAction event on bus 1
-            EBUS_EVENT_ID(1, MyEventGroupBus, OnAction, 1.0f, 2.0f);
+            MyEventGroupBus::Event(1, &MyEventGroupBus::Events::OnAction, 1.0f, 2.0f);
             EXPECT_EQ(4, meh0.actionCalls);
 
             meh0.BusDisconnect(1); // we disconnect from receiving events on bus 1
 
-            EBUS_EVENT(MyEventGroupBus, OnAction, 1.0f, 2.0f);  // this signal will NOT trigger only one call
+            MyEventGroupBus::Broadcast(&MyEventGroupBus::Events::OnAction, 1.0f, 2.0f);  // this signal will NOT trigger only one call
             EXPECT_EQ(5, meh0.actionCalls);
         }
     }
@@ -1747,14 +1747,14 @@ namespace UnitTest
 
         void QueueMessage()
         {
-            EBUS_QUEUE_EVENT_ID(0, QueueTestMultiBus, OnMessage);
-            EBUS_QUEUE_EVENT(QueueTestSingleBus, OnMessage);
+            QueueTestMultiBus::QueueEvent(0, &QueueTestMultiBus::Events::OnMessage);
+            QueueTestSingleBus::QueueBroadcast(&QueueTestSingleBus::Events::OnMessage);
         }
 
         void QueueMessagePtr()
         {
-            EBUS_QUEUE_EVENT_PTR(m_multiPtr, QueueTestMultiBus, OnMessage);
-            EBUS_QUEUE_EVENT(QueueTestSingleBus, OnMessage);
+            QueueTestMultiBus::QueueEvent(m_multiPtr, &QueueTestMultiBus::Events::OnMessage);
+            QueueTestSingleBus::QueueBroadcast(&QueueTestSingleBus::Events::OnMessage);
         }
     }
 
@@ -1800,7 +1800,7 @@ namespace UnitTest
         QueueTestSingleBus::QueueFunction(&QueueTestSingleBus::Handler::BusDisconnect, m_singleHandler);
 
         // the same as m_multiHandler.BusDisconnect(); but dalayed until QueueTestMultiBus::ExecuteQueuedEvents();
-        EBUS_QUEUE_FUNCTION(QueueTestMultiBus, static_cast<void(QueueTestMultiBus::Handler::*)()>(&QueueTestMultiBus::Handler::BusDisconnect), m_multiHandler);
+        QueueTestMultiBus::QueueFunction(static_cast<void(QueueTestMultiBus::Handler::*)()>(&QueueTestMultiBus::Handler::BusDisconnect), m_multiHandler);
 
         EXPECT_EQ(1, QueueTestSingleBus::GetTotalNumOfEventHandlers());
         EXPECT_EQ(1, QueueTestMultiBus::GetTotalNumOfEventHandlers());
@@ -1998,10 +1998,10 @@ namespace UnitTest
         ConnectDisconnectHandler l(&child);
         EXPECT_EQ(1, ConnectDisconnectBus::GetTotalNumOfEventHandlers());
         // Test connect in the during the message call
-        EBUS_EVENT(ConnectDisconnectBus, OnConnectChild); // connect the child object
+        ConnectDisconnectBus::Broadcast(&ConnectDisconnectBus::Events::OnConnectChild); // connect the child object
 
         EXPECT_EQ(2, ConnectDisconnectBus::GetTotalNumOfEventHandlers());
-        EBUS_EVENT(ConnectDisconnectBus, OnDisconnectAll); // Disconnect all members during a message
+        ConnectDisconnectBus::Broadcast(&ConnectDisconnectBus::Events::OnDisconnectAll); // Disconnect all members during a message
         EXPECT_EQ(0, ConnectDisconnectBus::GetTotalNumOfEventHandlers());
 
 
@@ -2011,15 +2011,15 @@ namespace UnitTest
         ConnectDisconnectIdOrderedHandler pa10(10, 10, &ch10);
         ConnectDisconnectIdOrderedHandler pa20(20, 20, &ch5);
         EXPECT_EQ(2, ConnectDisconnectIdOrderedBus::GetTotalNumOfEventHandlers());
-        EBUS_EVENT(ConnectDisconnectIdOrderedBus, OnConnectChild); // connect the child object
+        ConnectDisconnectIdOrderedBus::Broadcast(&ConnectDisconnectIdOrderedBus::Events::OnConnectChild); // connect the child object
         EXPECT_EQ(4, ConnectDisconnectIdOrderedBus::GetTotalNumOfEventHandlers());
 
         // Disconnect all members from bus 10 (it will be sorted first)
         // This we we can test a bus removal while traversing
-        EBUS_EVENT(ConnectDisconnectIdOrderedBus, OnDisconnectAll, 10);
+        ConnectDisconnectIdOrderedBus::Broadcast(&ConnectDisconnectIdOrderedBus::Events::OnDisconnectAll, 10);
         EXPECT_EQ(2, ConnectDisconnectIdOrderedBus::GetTotalNumOfEventHandlers());
         // Now disconnect all buses
-        EBUS_EVENT(ConnectDisconnectIdOrderedBus, OnDisconnectAll, -1);
+        ConnectDisconnectIdOrderedBus::Broadcast(&ConnectDisconnectIdOrderedBus::Events::OnDisconnectAll, -1);
         EXPECT_EQ(0, ConnectDisconnectIdOrderedBus::GetTotalNumOfEventHandlers());
     }
 
@@ -2219,23 +2219,23 @@ namespace UnitTest
         // Called outside of an even it should always return nullptr
         EXPECT_EQ(nullptr, MyEventBus::GetCurrentBusId());
 
-        EBUS_EVENT_ID(1, MyEventBus, OnAction);  // this should not trigger a call
+        MyEventBus::Event(1, &MyEventBus::Events::OnAction);  // this should not trigger a call
         EXPECT_EQ(0, ml.m_numCalls);
 
         // Issues calls which we listen for
         ml.m_expectedCurrentId = 10;
         mlCopy.m_expectedCurrentId = 10;
-        EBUS_EVENT_ID(10, MyEventBus, OnAction);
+        MyEventBus::Event(10, &MyEventBus::Events::OnAction);
         EXPECT_EQ(1, ml.m_numCalls);
         EXPECT_EQ(1, mlCopy.m_numCalls);  // make sure the handler copy is connected
         mlCopy.BusDisconnect();
 
         ml.m_expectedCurrentId = 12;
-        EBUS_EVENT_ID(12, MyEventBus, OnAction);
+        MyEventBus::Event(12, &MyEventBus::Events::OnAction);
         EXPECT_EQ(2, ml.m_numCalls);
 
         ml.m_expectedCurrentId = 13;
-        EBUS_EVENT_ID(13, MyEventBus, OnAction);
+        MyEventBus::Event(13, &MyEventBus::Events::OnAction);
         EXPECT_EQ(3, ml.m_numCalls);
     }
 
@@ -2354,12 +2354,12 @@ namespace UnitTest
         Handler1 h1Copy = h1;
         EXPECT_EQ(0, h1Copy.m_calls);
 
-        EBUS_EVENT(My3rdPartyBus1, SomeEvent, 1);
+        My3rdPartyBus1::Broadcast(&My3rdPartyBus1::Events::SomeEvent, 1);
         EXPECT_EQ(1, h1.m_calls);
         EXPECT_EQ(1, h1Copy.m_calls);  // check that the copy works too
-        EBUS_EVENT(My3rdPartyBus2, SomeEvent, 2);
+        My3rdPartyBus2::Broadcast(&My3rdPartyBus2::Events::SomeEvent, 2);
         EXPECT_EQ(1, h2.m_calls);
-        EBUS_EVENT(MyEBusInterface, Event, 3);
+        MyEBusInterface::Broadcast(&MyEBusInterface::Events::Event, 3);
         EXPECT_EQ(1, h3.m_calls);
     }
 

+ 2 - 1
Code/Framework/AzCore/Tests/EntityTests.cpp

@@ -345,7 +345,8 @@ namespace UnitTest
     AZ::ComponentDescriptor* SortOrderTestComponentWrapper::CreateDescriptor()
     {
         AZ::ComponentDescriptor* descriptor = nullptr;
-        EBUS_EVENT_ID_RESULT(descriptor, SortOrderTestComponentWrapper::RTTI_Type(), AZ::ComponentDescriptorBus, GetDescriptor);
+        AZ::ComponentDescriptorBus::EventResult(
+            descriptor, SortOrderTestComponentWrapper::RTTI_Type(), &AZ::ComponentDescriptorBus::Events::GetDescriptor);
 
         return descriptor ? descriptor : aznew SortOrderComponentWrapperDescriptor();
     }

+ 1 - 1
Code/Framework/AzCore/Tests/Module.cpp

@@ -156,7 +156,7 @@ namespace UnitTest
 
             { // Query both modules via the ModuleTestRequestBus
                 EBusAggregateResults<const char*> moduleNames;
-                EBUS_EVENT_RESULT(moduleNames, ModuleTestRequestBus, GetModuleName);
+                ModuleTestRequestBus::BroadcastResult(moduleNames, &ModuleTestRequestBus::Events::GetModuleName);
 
                 EXPECT_TRUE(moduleNames.values.size() == 2);
                 bool foundStaticModule = false;

+ 11 - 11
Code/Framework/AzCore/Tests/Script.cpp

@@ -3730,23 +3730,23 @@ namespace UnitTest
             // Test sending messages from C++ to LUA handler
             script.Execute("handler = TestBus.Connect(MyBusHandlerMetaTable1)");
             AZ_TEST_START_TRACE_SUPPRESSION;
-            EBUS_EVENT(TestBus, Set);
+            TestBus::Broadcast(&TestBus::Events::Set);
             AZ_TEST_STOP_TRACE_SUPPRESSION(1);
-            EBUS_EVENT(TestBus, SetNotImplemented); // nothing should happen here
+            TestBus::Broadcast(&TestBus::Events::SetNotImplemented); // nothing should happen here
             AZ_TEST_START_TRACE_SUPPRESSION;
-            EBUS_EVENT(TestBus, SetSum1, 1);
+            TestBus::Broadcast(&TestBus::Events::SetSum1, 1);
             AZ_TEST_STOP_TRACE_SUPPRESSION(1);
             AZ_TEST_START_TRACE_SUPPRESSION;
-            EBUS_EVENT(TestBus, SetSum2, 1, 2);
+            TestBus::Broadcast(&TestBus::Events::SetSum2, 1, 2);
             AZ_TEST_STOP_TRACE_SUPPRESSION(1);
             AZ_TEST_START_TRACE_SUPPRESSION;
-            EBUS_EVENT(TestBus, SetSum3, 1, 2, 3);
+            TestBus::Broadcast(&TestBus::Events::SetSum3, 1, 2, 3);
             AZ_TEST_STOP_TRACE_SUPPRESSION(1);
             AZ_TEST_START_TRACE_SUPPRESSION;
-            EBUS_EVENT(TestBus, SetSum4, 1, 2, 3, 4);
+            TestBus::Broadcast(&TestBus::Events::SetSum4, 1, 2, 3, 4);
             AZ_TEST_STOP_TRACE_SUPPRESSION(1);
             AZ_TEST_START_TRACE_SUPPRESSION;
-            EBUS_EVENT(TestBus, SetSum5, 1, 2, 3, 4, 5);
+            TestBus::Broadcast(&TestBus::Events::SetSum5, 1, 2, 3, 4, 5);
             AZ_TEST_STOP_TRACE_SUPPRESSION(1);
             script.Execute("handler:Disconnect()");
 
@@ -4034,16 +4034,16 @@ ramenShop.handler:Connect(4);
 
             // Test sending messages from C++ to two LUA handlers on different bus ids
             AZ_TEST_START_TRACE_SUPPRESSION;
-            EBUS_EVENT_ID(1, TestIdBus, VoidFunc0);
+            TestIdBus::Event(1, &TestIdBus::Events::VoidFunc0);
             AZ_TEST_STOP_TRACE_SUPPRESSION(1);
             AZ_TEST_START_TRACE_SUPPRESSION;
-            EBUS_EVENT_ID(2, TestIdBus, VoidFunc0);
+            TestIdBus::Event(2, &TestIdBus::Events::VoidFunc0);
             AZ_TEST_STOP_TRACE_SUPPRESSION(1);
             float ret = 0.f;
-            EBUS_EVENT_ID_RESULT(ret, 1, TestIdBus, Pick, 1.f, 2.f, 3.f);
+            TestIdBus::EventResult(ret, 1, &TestIdBus::Events::Pick, 1.f, 2.f, 3.f);
             AZ_TEST_ASSERT(ret == 1.f);
             ret = 0;
-            EBUS_EVENT_ID_RESULT(ret, 2, TestIdBus, Pick, 1.f, 2.f, 3.f);
+            TestIdBus::EventResult(ret, 2, &TestIdBus::Events::Pick, 1.f, 2.f, 3.f);
             AZ_TEST_ASSERT(ret == 2.f);
             script.Execute("handler1:Disconnect()");
             script.Execute("handler2:Disconnect()");

+ 3 - 2
Code/Framework/AzFramework/AzFramework/Application/Application.cpp

@@ -304,7 +304,8 @@ namespace AzFramework
 #endif // #if !defined(AZCORE_EXCLUDE_LUA)
         };
 
-        EBUS_EVENT(AzFramework::MetricsPlainTextNameRegistrationBus, RegisterForNameSending, componentUuidsForMetricsCollection);
+        AzFramework::MetricsPlainTextNameRegistrationBus::Broadcast(
+            &AzFramework::MetricsPlainTextNameRegistrationBus::Events::RegisterForNameSending, componentUuidsForMetricsCollection);
     }
 
     void Application::Reflect(AZ::ReflectContext* context)
@@ -431,7 +432,7 @@ namespace AzFramework
     {
         AZ::Uuid uuid(AZ::Uuid::CreateNull());
         AZ::Entity* entity = nullptr;
-        EBUS_EVENT_RESULT(entity, AZ::ComponentApplicationBus, FindEntity, entityId);
+        AZ::ComponentApplicationBus::BroadcastResult(entity, &AZ::ComponentApplicationBus::Events::FindEntity, entityId);
         if (entity)
         {
             AZ::Component* component = entity->FindComponent(componentId);

+ 10 - 8
Code/Framework/AzFramework/AzFramework/Asset/AssetCatalog.cpp

@@ -137,7 +137,7 @@ namespace AzFramework
     void AssetCatalog::AddExtension(const char* extension)
     {
         AZStd::string extensionFixed = extension;
-        EBUS_EVENT(ApplicationRequests::Bus, NormalizePath, extensionFixed);
+        ApplicationRequests::Bus::Broadcast(&ApplicationRequests::Bus::Events::NormalizePath, extensionFixed);
 
         if (extensionFixed.empty())
         {
@@ -150,7 +150,7 @@ namespace AzFramework
             extensionFixed = extensionFixed.substr(1);
         }
 
-        EBUS_EVENT(ApplicationRequests::Bus, NormalizePath, extensionFixed);
+        ApplicationRequests::Bus::Broadcast(&ApplicationRequests::Bus::Events::NormalizePath, extensionFixed);
 
         if (m_extensions.end() == AZStd::find(m_extensions.begin(), m_extensions.end(), extensionFixed))
         {
@@ -241,7 +241,8 @@ namespace AzFramework
             return AZ::Data::AssetId();
         }
         m_pathBuffer = path;
-        EBUS_EVENT(AzFramework::ApplicationRequests::Bus, MakePathAssetRootRelative, m_pathBuffer);
+        AzFramework::ApplicationRequests::Bus::Broadcast(
+            &AzFramework::ApplicationRequests::Bus::Events::MakePathAssetRootRelative, m_pathBuffer);
         {
             AZStd::lock_guard<AZStd::recursive_mutex> lock(m_registryMutex);
 
@@ -284,7 +285,7 @@ namespace AzFramework
                 m_registry->RegisterAsset(generatedID, newInfo);
             }
 
-            EBUS_EVENT(AzFramework::AssetCatalogEventBus, OnCatalogAssetAdded, generatedID);
+            AzFramework::AssetCatalogEventBus::Broadcast(&AzFramework::AssetCatalogEventBus::Events::OnCatalogAssetAdded, generatedID);
 
             return generatedID;
         }
@@ -480,7 +481,7 @@ namespace AzFramework
             return AZ::Data::AssetId();
         }
         AZStd::string relativePath = path;
-        EBUS_EVENT(ApplicationRequests::Bus, MakePathAssetRootRelative, relativePath);
+        ApplicationRequests::Bus::Broadcast(&ApplicationRequests::Bus::Events::MakePathAssetRootRelative, relativePath);
         return AZ::Data::AssetId(AZ::Uuid::CreateName(relativePath.c_str()));
     }
 
@@ -556,7 +557,7 @@ namespace AzFramework
 
             // Reflect registry for serialization.
             AZ::SerializeContext* serializeContext = nullptr;
-            EBUS_EVENT_RESULT(serializeContext, AZ::ComponentApplicationBus, GetSerializeContext);
+            AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationBus::Events::GetSerializeContext);
             AZ_Assert(serializeContext, "Unable to retrieve serialize context.");
             if (nullptr == serializeContext->FindClassData(AZ::AzTypeInfo<AssetRegistry>::Uuid()))
             {
@@ -680,7 +681,7 @@ namespace AzFramework
             AZStd::lock_guard<AZStd::recursive_mutex> lock(m_registryMutex);
             m_registry->RegisterAsset(id, info);
         }
-        EBUS_EVENT(AzFramework::AssetCatalogEventBus, OnCatalogAssetAdded, id);
+        AzFramework::AssetCatalogEventBus::Broadcast(&AzFramework::AssetCatalogEventBus::Events::OnCatalogAssetAdded, id);
     }
 
     //=========================================================================
@@ -813,7 +814,8 @@ namespace AzFramework
         for (const auto& message : messages)
         {
             AZStd::string relativePath = message.m_data;
-            EBUS_EVENT(AzFramework::ApplicationRequests::Bus, MakePathAssetRootRelative, relativePath);
+            AzFramework::ApplicationRequests::Bus::Broadcast(
+                &AzFramework::ApplicationRequests::Bus::Events::MakePathAssetRootRelative, relativePath);
 
             AZ::Data::AssetId assetId = message.m_assetId;
 

+ 2 - 1
Code/Framework/AzFramework/AzFramework/Asset/AssetSystemComponent.cpp

@@ -673,7 +673,8 @@ namespace AzFramework
             {
                 if (NegotiationWithAssetProcessorFailed())
                 {
-                    EBUS_EVENT(AzFramework::AssetSystemConnectionNotificationsBus, NegotiationFailed);
+                    AzFramework::AssetSystemConnectionNotificationsBus::Broadcast(
+                        &AzFramework::AssetSystemConnectionNotificationsBus::Events::NegotiationFailed);
                     StartDisconnectingAssetProcessor();
                     return false;
                 }

+ 5 - 4
Code/Framework/AzFramework/AzFramework/Asset/GenericAssetHandler.h

@@ -109,7 +109,7 @@ namespace AzFramework
 
             if (!m_serializeContext)
             {
-                EBUS_EVENT_RESULT(m_serializeContext, AZ::ComponentApplicationBus, GetSerializeContext);
+                AZ::ComponentApplicationBus::BroadcastResult(m_serializeContext, &AZ::ComponentApplicationBus::Events::GetSerializeContext);
             }
 
             AZ::AssetTypeInfoBus::Handler::BusConnect(AZ::AzTypeInfo<AssetType>::Uuid());
@@ -171,8 +171,9 @@ namespace AzFramework
 
         void Register()
         {
-            EBUS_EVENT(AZ::Data::AssetCatalogRequestBus, EnableCatalogForAsset, AZ::AzTypeInfo<AssetType>::Uuid());
-            EBUS_EVENT(AZ::Data::AssetCatalogRequestBus, AddExtension, m_extension.c_str());
+            AZ::Data::AssetCatalogRequestBus::Broadcast(
+                &AZ::Data::AssetCatalogRequestBus::Events::EnableCatalogForAsset, AZ::AzTypeInfo<AssetType>::Uuid());
+            AZ::Data::AssetCatalogRequestBus::Broadcast(&AZ::Data::AssetCatalogRequestBus::Events::AddExtension, m_extension.c_str());
 
             AZ_Assert(AZ::Data::AssetManager::IsReady(), "AssetManager isn't ready!");
             AZ::Data::AssetManager::Instance().RegisterHandler(this, AZ::AzTypeInfo<AssetType>::Uuid());
@@ -189,7 +190,7 @@ namespace AzFramework
         bool CanHandleAsset(const AZ::Data::AssetId& id) const override
         {
             AZStd::string assetPath;
-            EBUS_EVENT_RESULT(assetPath, AZ::Data::AssetCatalogRequestBus, GetAssetPathById, id);
+            AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetPath, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetPathById, id);
             if (!assetPath.empty())
             {
                 AZStd::string assetExtension;

+ 17 - 11
Code/Framework/AzFramework/AzFramework/Components/TransformComponent.cpp

@@ -158,7 +158,7 @@ namespace AzFramework
 
     void TransformComponent::Deactivate()
     {
-        EBUS_EVENT_ID(m_parentId, AZ::TransformNotificationBus, OnChildRemoved, GetEntityId());
+        AZ::TransformNotificationBus::Event(m_parentId, &AZ::TransformNotificationBus::Events::OnChildRemoved, GetEntityId());
         auto parentTransform = AZ::TransformBus::FindFirstHandler(m_parentId);
         if (parentTransform)
         {
@@ -435,7 +435,7 @@ namespace AzFramework
     AZStd::vector<AZ::EntityId> TransformComponent::GetChildren()
     {
         AZStd::vector<AZ::EntityId> children;
-        EBUS_EVENT_ID(GetEntityId(), AZ::TransformHierarchyInformationBus, GatherChildren, children);
+        AZ::TransformHierarchyInformationBus::Event(GetEntityId(), &AZ::TransformHierarchyInformationBus::Events::GatherChildren, children);
         return children;
     }
 
@@ -444,7 +444,8 @@ namespace AzFramework
         AZStd::vector<AZ::EntityId> descendants = GetChildren();
         for (size_t i = 0; i < descendants.size(); ++i)
         {
-            EBUS_EVENT_ID(descendants[i], AZ::TransformHierarchyInformationBus, GatherChildren, descendants);
+            AZ::TransformHierarchyInformationBus::Event(
+                descendants[i], &AZ::TransformHierarchyInformationBus::Events::GatherChildren, descendants);
         }
         return descendants;
     }
@@ -454,7 +455,8 @@ namespace AzFramework
         AZStd::vector<AZ::EntityId> descendants = { GetEntityId() };
         for (size_t i = 0; i < descendants.size(); ++i)
         {
-            EBUS_EVENT_ID(descendants[i], AZ::TransformHierarchyInformationBus, GatherChildren, descendants);
+            AZ::TransformHierarchyInformationBus::Event(
+                descendants[i], &AZ::TransformHierarchyInformationBus::Events::GatherChildren, descendants);
         }
         return descendants;
     }
@@ -577,17 +579,18 @@ namespace AzFramework
 
             if (oldParent.IsValid())
             {
-                EBUS_EVENT_PTR(m_notificationBus, AZ::TransformNotificationBus, OnTransformChanged, m_localTM, m_worldTM);
+                AZ::TransformNotificationBus::Event(
+                    m_notificationBus, &AZ::TransformNotificationBus::Events::OnTransformChanged, m_localTM, m_worldTM);
                 m_transformChangedEvent.Signal(m_localTM, m_worldTM);
             }
         }
 
-        EBUS_EVENT_PTR(m_notificationBus, AZ::TransformNotificationBus, OnParentChanged, oldParent, parentId);
+        AZ::TransformNotificationBus::Event(m_notificationBus, &AZ::TransformNotificationBus::Events::OnParentChanged, oldParent, parentId);
         m_parentChangedEvent.Signal(oldParent, parentId);
 
         if (oldParent.IsValid() && oldParent != parentId) // Don't send removal notification while activating.
         {
-            EBUS_EVENT_ID(oldParent, AZ::TransformNotificationBus, OnChildRemoved, GetEntityId());
+            AZ::TransformNotificationBus::Event(oldParent, &AZ::TransformNotificationBus::Events::OnChildRemoved, GetEntityId());
             auto oldParentTransform = AZ::TransformBus::FindFirstHandler(oldParent);
             if (oldParentTransform)
             {
@@ -595,7 +598,7 @@ namespace AzFramework
             }
         }
 
-        EBUS_EVENT_ID(parentId, AZ::TransformNotificationBus, OnChildAdded, GetEntityId());
+        AZ::TransformNotificationBus::Event(parentId, &AZ::TransformNotificationBus::Events::OnChildAdded, GetEntityId());
         auto newParentTransform = AZ::TransformBus::FindFirstHandler(parentId);
         if (newParentTransform)
         {
@@ -622,7 +625,8 @@ namespace AzFramework
         if (m_parentTM)
         {
             m_worldTM = parentWorldTM * m_localTM;
-            EBUS_EVENT_PTR(m_notificationBus, AZ::TransformNotificationBus, OnTransformChanged, m_localTM, m_worldTM);
+            AZ::TransformNotificationBus::Event(
+                m_notificationBus, &AZ::TransformNotificationBus::Events::OnTransformChanged, m_localTM, m_worldTM);
             m_transformChangedEvent.Signal(m_localTM, m_worldTM);
         }
     }
@@ -638,7 +642,8 @@ namespace AzFramework
             m_localTM = m_worldTM;
         }
 
-        EBUS_EVENT_PTR(m_notificationBus, AZ::TransformNotificationBus, OnTransformChanged, m_localTM, m_worldTM);
+        AZ::TransformNotificationBus::Event(
+            m_notificationBus, &AZ::TransformNotificationBus::Events::OnTransformChanged, m_localTM, m_worldTM);
         m_transformChangedEvent.Signal(m_localTM, m_worldTM);
 
         AzFramework::IEntityBoundsUnion* boundsUnion = AZ::Interface<AzFramework::IEntityBoundsUnion>::Get();
@@ -659,7 +664,8 @@ namespace AzFramework
             m_worldTM = m_localTM;
         }
 
-        EBUS_EVENT_PTR(m_notificationBus, AZ::TransformNotificationBus, OnTransformChanged, m_localTM, m_worldTM);
+        AZ::TransformNotificationBus::Event(
+            m_notificationBus, &AZ::TransformNotificationBus::Events::OnTransformChanged, m_localTM, m_worldTM);
         m_transformChangedEvent.Signal(m_localTM, m_worldTM);
     }
 

+ 6 - 6
Code/Framework/AzFramework/AzFramework/Entity/GameEntityContextComponent.cpp

@@ -183,7 +183,7 @@ namespace AzFramework
     //=========================================================================
     void GameEntityContextComponent::OnContextReset()
     {
-        EBUS_EVENT(GameEntityContextEventBus, OnGameEntitiesReset);
+        GameEntityContextEventBus::Broadcast(&GameEntityContextEventBus::Events::OnGameEntitiesReset);
     }
 
     //=========================================================================
@@ -274,12 +274,12 @@ namespace AzFramework
         AZStd::vector<AZ::EntityId> entityIdsToBeDeleted;
 
         AZ::Entity* entity = nullptr;
-        EBUS_EVENT_RESULT(entity, AZ::ComponentApplicationBus, FindEntity, entityId);
+        AZ::ComponentApplicationBus::BroadcastResult(entity, &AZ::ComponentApplicationBus::Events::FindEntity, entityId);
         if (entity)
         {
             if (destroyChildren)
             {
-                EBUS_EVENT_ID_RESULT(entityIdsToBeDeleted, entityId, AZ::TransformBus, GetAllDescendants);
+                AZ::TransformBus::EventResult(entityIdsToBeDeleted, entityId, &AZ::TransformBus::Events::GetAllDescendants);
             }
 
             // Inserting the parent to the list before its children; it will be deleted last by the reverse iterator
@@ -290,7 +290,7 @@ namespace AzFramework
             entityIdIter != entityIdsToBeDeleted.rend(); ++entityIdIter)
         {
             AZ::Entity* currentEntity = nullptr;
-            EBUS_EVENT_RESULT(currentEntity, AZ::ComponentApplicationBus, FindEntity, *entityIdIter);
+            AZ::ComponentApplicationBus::BroadcastResult(currentEntity, &AZ::ComponentApplicationBus::Events::FindEntity, *entityIdIter);
             if (currentEntity)
             {
                 bool isPrefabSystemEnabled = false;
@@ -339,7 +339,7 @@ namespace AzFramework
             }
         };
 
-        EBUS_QUEUE_FUNCTION(AZ::TickBus, destroyEntity);
+        AZ::TickBus::QueueFunction(destroyEntity);
     }
 
     //=========================================================================
@@ -365,7 +365,7 @@ namespace AzFramework
     {
         if (m_entityOwnershipService->LoadFromStream(stream, remapIds))
         {
-            EBUS_EVENT(GameEntityContextEventBus, OnGameEntitiesStarted);
+            GameEntityContextEventBus::Broadcast(&GameEntityContextEventBus::Events::OnGameEntitiesStarted);
             return true;
         }
 

+ 11 - 11
Code/Framework/AzFramework/AzFramework/Network/AssetProcessorConnection.cpp

@@ -198,7 +198,7 @@ namespace AzFramework
             //send the connecting event
             DebugMessage("AssetProcessorConnection::ConnectThread - Sending connecting event.");
             m_connectionState = EConnectionState::Connecting;
-            EBUS_EVENT(EngineConnectionEvents::Bus, Connecting, this);
+            EngineConnectionEvents::Bus::Broadcast(&EngineConnectionEvents::Bus::Events::Connecting, this);
 
             //set the address
             AZ::AzSock::AzSocketAddress socketAddress;
@@ -270,7 +270,7 @@ namespace AzFramework
                 DebugMessage("AssetProcessorConnection::ConnectThread - Negotiation with %s:%u, Successful.", m_connectAddr.c_str(), m_port);
                 //we successfully negotiated, send the connected event
                 m_connectionState = EConnectionState::Connected;
-                EBUS_EVENT(EngineConnectionEvents::Bus, Connected, this);
+                EngineConnectionEvents::Bus::Broadcast(&EngineConnectionEvents::Bus::Events::Connected, this);
                 return;
             }
 
@@ -345,7 +345,7 @@ namespace AzFramework
 
             //set disconnecting state
             m_connectionState = EConnectionState::Disconnecting;
-            EBUS_EVENT(EngineConnectionEvents::Bus, Disconnecting, this);
+            EngineConnectionEvents::Bus::Broadcast(&EngineConnectionEvents::Bus::Events::Disconnecting, this);
 
             FlushResponseHandlers();
 
@@ -397,7 +397,7 @@ namespace AzFramework
             //set disconnected state
             DebugMessage("AssetProcessorConnection::DisconnectThread - All threads joined, Setting Disconnected state.");
             m_connectionState = EConnectionState::Disconnected;
-            EBUS_EVENT(EngineConnectionEvents::Bus, Disconnected, this);
+            EngineConnectionEvents::Bus::Broadcast(&EngineConnectionEvents::Bus::Events::Disconnected, this);
 
             DebugMessage("AssetProcessorConnection::DisconnectThread - crossing the isBusyDisconnecting line");
             // once we cross this line, we would need to restart the disconnect thread in order to properly disconnect
@@ -458,7 +458,7 @@ namespace AzFramework
             {
                 m_negotiationFailed = true;
                 DebugMessage("AssetProcessorConnection::NegotateWithServer - negotiation invalid.Version Mismatch");
-                EBUS_EVENT(AssetSystemConnectionNotificationsBus, NegotiationFailed);
+                AssetSystemConnectionNotificationsBus::Broadcast(&AssetSystemConnectionNotificationsBus::Events::NegotiationFailed);
                 return false;
             }
 
@@ -474,7 +474,7 @@ namespace AzFramework
             {
                 m_negotiationFailed = true;
                 DebugMessage("AssetProcessorConnection::NegotiateWithServer - negotiation invalid");
-                EBUS_EVENT(AssetSystemConnectionNotificationsBus, NegotiationFailed);
+                AssetSystemConnectionNotificationsBus::Broadcast(&AssetSystemConnectionNotificationsBus::Events::NegotiationFailed);
                 return false;
             }
 
@@ -542,7 +542,7 @@ namespace AzFramework
             {
                 m_negotiationFailed = true;
                 DebugMessage("AssetProcessorConnection::NegotiateWithServer - negotiation invalid.Version Mismatch");
-                EBUS_EVENT(AssetSystemConnectionNotificationsBus, NegotiationFailed);
+                AssetSystemConnectionNotificationsBus::Broadcast(&AssetSystemConnectionNotificationsBus::Events::NegotiationFailed);
                 return false;
             }
 
@@ -558,7 +558,7 @@ namespace AzFramework
                 AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(100));    //Sleeping to make sure that the message get delivered to AP before socket get disconnected
                 m_negotiationFailed = true;
                 DebugMessage("AssetProcessorConnection::NegotiationWithClient - negotiation invalid");
-                EBUS_EVENT(AssetSystemConnectionNotificationsBus, NegotiationFailed);
+                AssetSystemConnectionNotificationsBus::Broadcast(&AssetSystemConnectionNotificationsBus::Events::NegotiationFailed);
                 return false;
             }
 
@@ -573,7 +573,7 @@ namespace AzFramework
             {
                 m_negotiationFailed = true;
                 DebugMessage("AssetProcessorConnection::NegotiationWithClient - negotiation invalid");
-                EBUS_EVENT(AssetSystemConnectionNotificationsBus, NegotiationFailed);
+                AssetSystemConnectionNotificationsBus::Broadcast(&AssetSystemConnectionNotificationsBus::Events::NegotiationFailed);
                 return false;
             }
 
@@ -719,7 +719,7 @@ namespace AzFramework
             }
 
             m_connectionState = EConnectionState::Listening;
-            EBUS_EVENT(EngineConnectionEvents::Bus, Listening, this);
+            EngineConnectionEvents::Bus::Broadcast(&EngineConnectionEvents::Bus::Events::Listening, this);
 
             // Listen for one connection
             result = AZ::AzSock::Listen(m_socket, 1);
@@ -787,7 +787,7 @@ namespace AzFramework
                 }
 
                 m_connectionState = EConnectionState::Connected;
-                EBUS_EVENT(EngineConnectionEvents::Bus, Connected, this);
+                EngineConnectionEvents::Bus::Broadcast(&EngineConnectionEvents::Bus::Events::Connected, this);
                 return;
             }
 

+ 3 - 2
Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp

@@ -489,7 +489,7 @@ namespace AzFramework
     void ScriptComponent::Init()
     {
         // Grab the script context
-        EBUS_EVENT_RESULT(m_context, AZ::ScriptSystemRequestBus, GetContext, m_contextId);
+        AZ::ScriptSystemRequestBus::BroadcastResult(m_context, &AZ::ScriptSystemRequestBus::Events::GetContext, m_contextId);
         AZ_Assert(m_context, "We must have a valid script context!");
     }
 
@@ -568,7 +568,8 @@ namespace AzFramework
 
         // Set the metamethods as we will use the script table as a metatable for entity tables
         bool success = false;
-        EBUS_EVENT_RESULT(success, AZ::ScriptSystemRequestBus, Load, m_script, AZ::k_scriptLoadBinary, m_contextId);
+        AZ::ScriptSystemRequestBus::BroadcastResult(
+            success, &AZ::ScriptSystemRequestBus::Events::Load, m_script, AZ::k_scriptLoadBinary, m_contextId);
         if (!success)
         {
             return false;

+ 9 - 4
Code/Framework/AzFramework/AzFramework/Script/ScriptRemoteDebugging.cpp

@@ -235,14 +235,16 @@ namespace AzFramework
 
         // register default app script context if there is one
         AZ::ScriptContext* defaultScriptContext = nullptr;
-        EBUS_EVENT_RESULT(defaultScriptContext, AZ::ScriptSystemRequestBus, GetContext, AZ::ScriptContextIds::DefaultScriptContextId);
+        AZ::ScriptSystemRequestBus::BroadcastResult(
+            defaultScriptContext, &AZ::ScriptSystemRequestBus::Events::GetContext, AZ::ScriptContextIds::DefaultScriptContextId);
         if (defaultScriptContext)
         {
             RegisterContext(defaultScriptContext, "Default");
         }
 
         AZ::ScriptContext* cryScriptContext = nullptr;
-        EBUS_EVENT_RESULT(cryScriptContext, AZ::ScriptSystemRequestBus, GetContext, AZ::ScriptContextIds::CryScriptContextId);
+        AZ::ScriptSystemRequestBus::BroadcastResult(
+            cryScriptContext, &AZ::ScriptSystemRequestBus::Events::GetContext, AZ::ScriptContextIds::CryScriptContextId);
         if (cryScriptContext)
         {
             RegisterContext(cryScriptContext, "Cry");
@@ -763,8 +765,11 @@ namespace AzFramework
         static bool registeredComponentUuidWithMetricsAlready = false;
         if (!registeredComponentUuidWithMetricsAlready)
         {
-            // have to let the metrics system know that it's ok to send back the name of the ScriptDebugAgent component to Amazon as plain text, without hashing
-            EBUS_EVENT(AzFramework::MetricsPlainTextNameRegistrationBus, RegisterForNameSending, AZStd::vector<AZ::Uuid>{ azrtti_typeid<ScriptDebugAgent>() });
+            // have to let the metrics system know that it's ok to send back the name of the ScriptDebugAgent component to Amazon as plain
+            // text, without hashing
+            AzFramework::MetricsPlainTextNameRegistrationBus::Broadcast(
+                &AzFramework::MetricsPlainTextNameRegistrationBus::Events::RegisterForNameSending,
+                AZStd::vector<AZ::Uuid>{ azrtti_typeid<ScriptDebugAgent>() });
 
             // only ever do this once
             registeredComponentUuidWithMetricsAlready = true;

+ 9 - 9
Code/Framework/AzFramework/Platform/Android/AzFramework/Application/Application_Android.cpp

@@ -184,14 +184,14 @@ namespace AzFramework
     ////////////////////////////////////////////////////////////////////////////////////////////////
     void ApplicationAndroid::OnLostFocus()
     {
-        EBUS_EVENT(ApplicationLifecycleEvents::Bus, OnApplicationConstrained, m_lastEvent);
+        ApplicationLifecycleEvents::Bus::Broadcast(&ApplicationLifecycleEvents::Bus::Events::OnApplicationConstrained, m_lastEvent);
         m_lastEvent = ApplicationLifecycleEvents::Event::Constrain;
     }
 
     ////////////////////////////////////////////////////////////////////////////////////////////////
     void ApplicationAndroid::OnGainedFocus()
     {
-        EBUS_EVENT(ApplicationLifecycleEvents::Bus, OnApplicationUnconstrained, m_lastEvent);
+        ApplicationLifecycleEvents::Bus::Broadcast(&ApplicationLifecycleEvents::Bus::Events::OnApplicationUnconstrained, m_lastEvent);
         m_lastEvent = ApplicationLifecycleEvents::Event::Unconstrain;
     }
 
@@ -199,45 +199,45 @@ namespace AzFramework
     void ApplicationAndroid::OnPause()
     {
 
-        EBUS_EVENT(ApplicationLifecycleEvents::Bus, OnApplicationSuspended, m_lastEvent);
+        ApplicationLifecycleEvents::Bus::Broadcast(&ApplicationLifecycleEvents::Bus::Events::OnApplicationSuspended, m_lastEvent);
         m_lastEvent = ApplicationLifecycleEvents::Event::Suspend;
     }
 
     ////////////////////////////////////////////////////////////////////////////////////////////////
     void ApplicationAndroid::OnResume()
     {
-        EBUS_EVENT(ApplicationLifecycleEvents::Bus, OnApplicationResumed, m_lastEvent);
+        ApplicationLifecycleEvents::Bus::Broadcast(&ApplicationLifecycleEvents::Bus::Events::OnApplicationResumed, m_lastEvent);
         m_lastEvent = ApplicationLifecycleEvents::Event::Resume;
     }
 
     ////////////////////////////////////////////////////////////////////////////////////////////////
     void ApplicationAndroid::OnDestroy()
     {
-        EBUS_EVENT(ApplicationLifecycleEvents::Bus, OnMobileApplicationWillTerminate);
+        ApplicationLifecycleEvents::Bus::Broadcast(&ApplicationLifecycleEvents::Bus::Events::OnMobileApplicationWillTerminate);
     }
 
     ////////////////////////////////////////////////////////////////////////////////////////////////
     void ApplicationAndroid::OnLowMemory()
     {
-        EBUS_EVENT(ApplicationLifecycleEvents::Bus, OnMobileApplicationLowMemoryWarning);
+        ApplicationLifecycleEvents::Bus::Broadcast(&ApplicationLifecycleEvents::Bus::Events::OnMobileApplicationLowMemoryWarning);
     }
 
     ////////////////////////////////////////////////////////////////////////////////////////////////
     void ApplicationAndroid::OnWindowInit()
     {
-        EBUS_EVENT(ApplicationLifecycleEvents::Bus, OnApplicationWindowCreated);
+        ApplicationLifecycleEvents::Bus::Broadcast(&ApplicationLifecycleEvents::Bus::Events::OnApplicationWindowCreated);
     }
 
     ////////////////////////////////////////////////////////////////////////////////////////////////
     void ApplicationAndroid::OnWindowDestroy()
     {
-        EBUS_EVENT(ApplicationLifecycleEvents::Bus, OnApplicationWindowDestroy);
+        ApplicationLifecycleEvents::Bus::Broadcast(&ApplicationLifecycleEvents::Bus::Events::OnApplicationWindowDestroy);
     }
 
     ////////////////////////////////////////////////////////////////////////////////////////////////
     void ApplicationAndroid::OnWindowRedrawNeeded()
     {
-        EBUS_EVENT(ApplicationLifecycleEvents::Bus, OnApplicationWindowRedrawNeeded);
+        ApplicationLifecycleEvents::Bus::Broadcast(&ApplicationLifecycleEvents::Bus::Events::OnApplicationWindowRedrawNeeded);
     }
 
     ////////////////////////////////////////////////////////////////////////////////////////////////

+ 4 - 4
Code/Framework/AzFramework/Platform/Windows/AzFramework/Application/Application_Windows.cpp

@@ -69,7 +69,7 @@ namespace AzFramework
         // guard against duplicate events
         if (m_lastEvent != ApplicationLifecycleEvents::Event::Suspend)
         {
-            EBUS_EVENT(ApplicationLifecycleEvents::Bus, OnApplicationSuspended, m_lastEvent);
+            ApplicationLifecycleEvents::Bus::Broadcast(&ApplicationLifecycleEvents::Bus::Events::OnApplicationSuspended, m_lastEvent);
             m_lastEvent = ApplicationLifecycleEvents::Event::Suspend;
         }
     }
@@ -80,7 +80,7 @@ namespace AzFramework
         // guard against duplicate events
         if (m_lastEvent != ApplicationLifecycleEvents::Event::Resume)
         {
-            EBUS_EVENT(ApplicationLifecycleEvents::Bus, OnApplicationResumed, m_lastEvent);
+            ApplicationLifecycleEvents::Bus::Broadcast(&ApplicationLifecycleEvents::Bus::Events::OnApplicationResumed, m_lastEvent);
             m_lastEvent = ApplicationLifecycleEvents::Event::Resume;
         }
     }
@@ -91,7 +91,7 @@ namespace AzFramework
         // guard against duplicate events
         if (m_lastEvent != ApplicationLifecycleEvents::Event::Constrain)
         {
-            EBUS_EVENT(ApplicationLifecycleEvents::Bus, OnApplicationConstrained, m_lastEvent);
+            ApplicationLifecycleEvents::Bus::Broadcast(&ApplicationLifecycleEvents::Bus::Events::OnApplicationConstrained, m_lastEvent);
             m_lastEvent = ApplicationLifecycleEvents::Event::Constrain;
         }
     }
@@ -102,7 +102,7 @@ namespace AzFramework
         // guard against duplicate events
         if (m_lastEvent != ApplicationLifecycleEvents::Event::Unconstrain)
         {
-            EBUS_EVENT(ApplicationLifecycleEvents::Bus, OnApplicationUnconstrained, m_lastEvent);
+            ApplicationLifecycleEvents::Bus::Broadcast(&ApplicationLifecycleEvents::Bus::Events::OnApplicationUnconstrained, m_lastEvent);
             m_lastEvent = ApplicationLifecycleEvents::Event::Unconstrain;
         }
     }

+ 1 - 1
Code/Framework/AzFramework/Tests/EntityContext.cpp

@@ -61,7 +61,7 @@ namespace UnitTest
             AZ_TEST_ASSERT(m_createEntityEvents == 1);
 
             AZ::Uuid contextId = AZ::Uuid::CreateNull();
-            EBUS_EVENT_ID_RESULT(contextId, entity->GetId(), EntityIdContextQueryBus, GetOwningContextId);
+            EntityIdContextQueryBus::EventResult(contextId, entity->GetId(), &EntityIdContextQueryBus::Events::GetOwningContextId);
 
             AZ_TEST_ASSERT(contextId == context.GetContextId()); // Context properly associated with entity?
 

+ 1 - 1
Gems/CrashReporting/Code/Source/GameCrashHandler.cpp

@@ -75,7 +75,7 @@ namespace CrashHandler
         else
         {
             AZStd::string enginePath;
-            EBUS_EVENT_RESULT(enginePath, AZ::ComponentApplicationBus, GetExecutableFolder);
+            AZ::ComponentApplicationBus::BroadcastResult(enginePath, &AZ::ComponentApplicationBus::Events::GetExecutableFolder);
 
             if (enginePath.length())
             {

+ 1 - 1
Gems/ImGui/Code/Source/ImGuiManager.cpp

@@ -740,7 +740,7 @@ void ImGuiManager::RenderImGuiBuffers(const ImVec2& scaleRects)
     ImGui::ImGuiContextScope contextScope(m_imguiContext);
 
     // Trigger all listeners to run their updates
-    EBUS_EVENT(ImGuiUpdateListenerBus, OnImGuiUpdate);
+    ImGuiUpdateListenerBus::Broadcast(&ImGuiUpdateListenerBus::Events::OnImGuiUpdate);
 
     // Run imgui's internal render and retrieve resulting draw data
     ImGui::Render();

+ 2 - 1
Gems/LmbrCentral/Code/Source/Builders/TranslationBuilder/TranslationBuilderComponent.cpp

@@ -40,7 +40,8 @@ namespace TranslationBuilder
         // (optimization) this builder does not emit source dependencies:
         builderDescriptor.m_flags |= AssetBuilderSDK::AssetBuilderDesc::BF_EmitsNoDependencies;
 
-        EBUS_EVENT(AssetBuilderSDK::AssetBuilderBus, RegisterBuilderInformation, builderDescriptor);
+        AssetBuilderSDK::AssetBuilderBus::Broadcast(
+            &AssetBuilderSDK::AssetBuilderBus::Events::RegisterBuilderInformation, builderDescriptor);
     }
 
     void BuilderPluginComponent::Deactivate()

+ 2 - 1
Gems/LmbrCentral/Code/Source/LmbrCentral.cpp

@@ -222,7 +222,8 @@ namespace LmbrCentral
         {
             typeIds.emplace_back(descriptor->GetUuid());
         }
-        EBUS_EVENT(AzFramework::MetricsPlainTextNameRegistrationBus, RegisterForNameSending, typeIds);
+        AzFramework::MetricsPlainTextNameRegistrationBus::Broadcast(
+            &AzFramework::MetricsPlainTextNameRegistrationBus::Events::RegisterForNameSending, typeIds);
     }
 
     //! Request system components on the system entity.

+ 2 - 1
Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp

@@ -99,7 +99,8 @@ namespace LmbrCentral
         {
             typeIds.emplace_back(descriptor->GetUuid());
         }
-        EBUS_EVENT(AzFramework::MetricsPlainTextNameRegistrationBus, RegisterForNameSending, typeIds);
+        AzFramework::MetricsPlainTextNameRegistrationBus::Broadcast(
+            &AzFramework::MetricsPlainTextNameRegistrationBus::Events::RegisterForNameSending, typeIds);
 
         AzToolsFramework::ActionManagerRegistrationNotificationBus::Handler::BusConnect();
     }

+ 1 - 1
Gems/LmbrCentral/Code/Source/Scripting/EditorLookAtComponent.cpp

@@ -181,7 +181,7 @@ namespace LmbrCentral
                 sourceTM.SetRotation(lookAtTransform.GetRotation());
                 sourceTM.SetTranslation(lookAtTransform.GetTranslation());
 
-                EBUS_EVENT_ID(GetEntityId(), AZ::TransformBus, SetWorldTM, lookAtTransform);
+                AZ::TransformBus::Event(GetEntityId(), &AZ::TransformBus::Events::SetWorldTM, lookAtTransform);
                 AZ::TransformBus::Event(GetEntityId(), &AZ::TransformBus::Events::SetWorldTM, sourceTM);
             }
             AZ::TransformNotificationBus::MultiHandler::BusConnect(GetEntityId());

+ 5 - 3
Gems/LmbrCentral/Code/Source/Scripting/SimpleStateComponent.cpp

@@ -44,7 +44,7 @@ namespace LmbrCentral
         for (const AZ::EntityId& currId : entitiyIds)
         {
             AZ::Entity* entity = nullptr;
-            EBUS_EVENT_RESULT(entity, AZ::ComponentApplicationBus, FindEntity, currId);
+            AZ::ComponentApplicationBus::BroadcastResult(entity, &AZ::ComponentApplicationBus::Events::FindEntity, currId);
             if (entity)
             {
                 entityFunction(entity);
@@ -288,7 +288,8 @@ namespace LmbrCentral
         {
             // Notify newly activated State
             // Note: Even if !m_resetStateOnActivate, the prior state to Activation is NullState
-            EBUS_EVENT_ID(GetEntityId(), SimpleStateComponentNotificationBus, OnStateChanged, nullptr, m_currentState->GetNameCStr());
+            SimpleStateComponentNotificationBus::Event(
+                GetEntityId(), &SimpleStateComponentNotificationBus::Events::OnStateChanged, nullptr, m_currentState->GetNameCStr());
         }
     }
 
@@ -330,7 +331,8 @@ namespace LmbrCentral
         {
             m_currentState = newState;
 
-            EBUS_EVENT_ID(GetEntityId(), SimpleStateComponentNotificationBus, OnStateChanged, oldName, newName);
+            SimpleStateComponentNotificationBus::Event(
+                GetEntityId(), &SimpleStateComponentNotificationBus::Events::OnStateChanged, oldName, newName);
         }
     }
 

+ 7 - 5
Gems/LmbrCentral/Code/Source/Scripting/SpawnerComponent.cpp

@@ -330,7 +330,7 @@ namespace LmbrCentral
     AzFramework::SliceInstantiationTicket SpawnerComponent::SpawnSliceInternalRelative(const AZ::Data::Asset<AZ::Data::AssetData>& slice, const AZ::Transform& relative)
     {
         AZ::Transform transform = AZ::Transform::Identity();
-        EBUS_EVENT_ID_RESULT(transform, GetEntityId(), AZ::TransformBus, GetWorldTM);
+        AZ::TransformBus::EventResult(transform, GetEntityId(), &AZ::TransformBus::Events::GetWorldTM);
 
         transform *= relative;
 
@@ -454,7 +454,7 @@ namespace LmbrCentral
     {
         const AzFramework::SliceInstantiationTicket ticket = (*AzFramework::SliceInstantiationResultBus::GetCurrentBusId());
 
-        EBUS_EVENT_ID(GetEntityId(), SpawnerComponentNotificationBus, OnSpawnBegin, ticket);
+        SpawnerComponentNotificationBus::Event(GetEntityId(), &SpawnerComponentNotificationBus::Events::OnSpawnBegin, ticket);
     }
 
     //=========================================================================
@@ -483,12 +483,14 @@ namespace LmbrCentral
             m_entityToTicketMap.emplace(AZStd::make_pair(currEntityId, ticket));
             AZ::EntityBus::MultiHandler::BusConnect(currEntityId);
 
-            EBUS_EVENT_ID(GetEntityId(), SpawnerComponentNotificationBus, OnEntitySpawned, ticket, currEntityId);
+            SpawnerComponentNotificationBus::Event(
+                GetEntityId(), &SpawnerComponentNotificationBus::Events::OnEntitySpawned, ticket, currEntityId);
         }
 
-        EBUS_EVENT_ID(GetEntityId(), SpawnerComponentNotificationBus, OnSpawnEnd, ticket);
+        SpawnerComponentNotificationBus::Event(GetEntityId(), &SpawnerComponentNotificationBus::Events::OnSpawnEnd, ticket);
 
-        EBUS_EVENT_ID(GetEntityId(), SpawnerComponentNotificationBus, OnEntitiesSpawned, ticket, entityIds);
+        SpawnerComponentNotificationBus::Event(
+            GetEntityId(), &SpawnerComponentNotificationBus::Events::OnEntitiesSpawned, ticket, entityIds);
 
         // If slice had no entities, clean it up
         if (entities.empty())

+ 6 - 6
Gems/LmbrCentral/Code/Source/Scripting/TagComponent.cpp

@@ -113,7 +113,7 @@ namespace LmbrCentral
         for (const Tag& tag : m_tags)
         {
             TagGlobalRequestBus::MultiHandler::BusConnect(tag);
-            EBUS_EVENT_ID(tag, TagGlobalNotificationBus, OnEntityTagAdded, GetEntityId());
+            TagGlobalNotificationBus::Event(tag, &TagGlobalNotificationBus::Events::OnEntityTagAdded, GetEntityId());
         }
         TagComponentRequestBus::Handler::BusConnect(GetEntityId());
     }
@@ -124,7 +124,7 @@ namespace LmbrCentral
         for (const Tag& tag : m_tags)
         {
             TagGlobalRequestBus::MultiHandler::BusDisconnect(tag);
-            EBUS_EVENT_ID(tag, TagGlobalNotificationBus, OnEntityTagRemoved, GetEntityId());
+            TagGlobalNotificationBus::Event(tag, &TagGlobalNotificationBus::Events::OnEntityTagRemoved, GetEntityId());
         }
     }
 
@@ -148,8 +148,8 @@ namespace LmbrCentral
     {
         if (m_tags.insert(tag).second)
         {
-            EBUS_EVENT_ID(GetEntityId(), TagComponentNotificationsBus, OnTagAdded, tag);
-            EBUS_EVENT_ID(tag, TagGlobalNotificationBus, OnEntityTagAdded, GetEntityId());
+            TagComponentNotificationsBus::Event(GetEntityId(), &TagComponentNotificationsBus::Events::OnTagAdded, tag);
+            TagGlobalNotificationBus::Event(tag, &TagGlobalNotificationBus::Events::OnEntityTagAdded, GetEntityId());
             TagGlobalRequestBus::MultiHandler::BusConnect(tag);
         }
     }
@@ -166,8 +166,8 @@ namespace LmbrCentral
     {
         if (m_tags.erase(tag) > 0)
         {
-            EBUS_EVENT_ID(GetEntityId(), TagComponentNotificationsBus, OnTagRemoved, tag);
-            EBUS_EVENT_ID(tag, TagGlobalNotificationBus, OnEntityTagRemoved, GetEntityId());
+            TagComponentNotificationsBus::Event(GetEntityId(), &TagComponentNotificationsBus::Events::OnTagRemoved, tag);
+            TagGlobalNotificationBus::Event(tag, &TagGlobalNotificationBus::Events::OnEntityTagRemoved, GetEntityId());
             TagGlobalRequestBus::MultiHandler::BusDisconnect(tag);
         }
     }

+ 23 - 9
Gems/LmbrCentral/Code/Source/Shape/CompoundShapeComponent.cpp

@@ -54,7 +54,7 @@ namespace LmbrCentral
         for (AZ::EntityId childEntity : m_configuration.GetChildEntities())
         {
             AZ::Aabb childAabb = AZ::Aabb::CreateNull();
-            EBUS_EVENT_ID_RESULT(childAabb, childEntity, ShapeComponentRequestsBus, GetEncompassingAabb);
+            ShapeComponentRequestsBus::EventResult(childAabb, childEntity, &ShapeComponentRequestsBus::Events::GetEncompassingAabb);
             if (childAabb.IsValid())
             {
                 finalAabb.AddAabb(childAabb);
@@ -103,7 +103,7 @@ namespace LmbrCentral
         bool result = false;
         for (AZ::EntityId childEntity : m_configuration.GetChildEntities())
         {
-            EBUS_EVENT_ID_RESULT(result, childEntity, ShapeComponentRequestsBus, IsPointInside, point);
+            ShapeComponentRequestsBus::EventResult(result, childEntity, &ShapeComponentRequestsBus::Events::IsPointInside, point);
             if (result)
             {
                 break;
@@ -118,7 +118,8 @@ namespace LmbrCentral
         for (AZ::EntityId childEntity : m_configuration.GetChildEntities())
         {
             float currentDistanceSquared = FLT_MAX;
-            EBUS_EVENT_ID_RESULT(currentDistanceSquared, childEntity, ShapeComponentRequestsBus, DistanceSquaredFromPoint, point);
+            ShapeComponentRequestsBus::EventResult(
+                currentDistanceSquared, childEntity, &ShapeComponentRequestsBus::Events::DistanceSquaredFromPoint, point);
             if (currentDistanceSquared < smallestDistanceSquared)
             {
                 smallestDistanceSquared = currentDistanceSquared;
@@ -149,7 +150,10 @@ namespace LmbrCentral
 
         if (ShapeComponentRequestsBus::Handler::BusIsConnected() && CompoundShapeComponentRequestsBus::Handler::BusIsConnected())
         {
-            EBUS_EVENT_ID(GetEntityId(), ShapeComponentNotificationsBus, OnShapeChanged, ShapeComponentNotifications::ShapeChangeReasons::ShapeChanged);
+            ShapeComponentNotificationsBus::Event(
+                GetEntityId(),
+                &ShapeComponentNotificationsBus::Events::OnShapeChanged,
+                ShapeComponentNotifications::ShapeChangeReasons::ShapeChanged);
         }
     }
 
@@ -157,20 +161,30 @@ namespace LmbrCentral
     {
         m_currentlyActiveChildren--;
         ShapeComponentNotificationsBus::MultiHandler::BusDisconnect(id);
-        EBUS_EVENT_ID(GetEntityId(), ShapeComponentNotificationsBus, OnShapeChanged, ShapeComponentNotifications::ShapeChangeReasons::ShapeChanged);
+        ShapeComponentNotificationsBus::Event(
+            GetEntityId(),
+            &ShapeComponentNotificationsBus::Events::OnShapeChanged,
+            ShapeComponentNotifications::ShapeChangeReasons::ShapeChanged);
     }
 
     void CompoundShapeComponent::OnShapeChanged(ShapeComponentNotifications::ShapeChangeReasons changeReason)
     {
         if (changeReason == ShapeComponentNotifications::ShapeChangeReasons::ShapeChanged)
         {
-            EBUS_EVENT_ID(GetEntityId(), ShapeComponentNotificationsBus, OnShapeChanged, ShapeComponentNotifications::ShapeChangeReasons::ShapeChanged);
+            ShapeComponentNotificationsBus::Event(
+                GetEntityId(),
+                &ShapeComponentNotificationsBus::Events::OnShapeChanged,
+                ShapeComponentNotifications::ShapeChangeReasons::ShapeChanged);
         }
         else if (changeReason == ShapeComponentNotifications::ShapeChangeReasons::TransformChanged)
         {
-            // If there are multiple shapes in a compound shape, then moving one of them changes the overall compound shape, otherwise the transform change is bubbled up directly
-            EBUS_EVENT_ID(GetEntityId(), ShapeComponentNotificationsBus, OnShapeChanged, (m_currentlyActiveChildren > 1) ? ShapeComponentNotifications::ShapeChangeReasons::ShapeChanged
-                          : ShapeComponentNotifications::ShapeChangeReasons::TransformChanged);
+            // If there are multiple shapes in a compound shape, then moving one of them changes the overall compound shape, otherwise the
+            // transform change is bubbled up directly
+            ShapeComponentNotificationsBus::Event(
+                GetEntityId(),
+                &ShapeComponentNotificationsBus::Events::OnShapeChanged,
+                (m_currentlyActiveChildren > 1) ? ShapeComponentNotifications::ShapeChangeReasons::ShapeChanged
+                                                : ShapeComponentNotifications::ShapeChangeReasons::TransformChanged);
         }
     }
 

+ 1 - 1
Gems/LmbrCentral/Code/include/LmbrCentral/Ai/NavigationComponentBus.h

@@ -74,7 +74,7 @@ namespace LmbrCentral
 
             // Get the target entity's position
             AZ::Transform entityTransform = AZ::Transform::CreateIdentity();
-            EBUS_EVENT_ID_RESULT(entityTransform, m_targetEntityId, AZ::TransformBus, GetWorldTM);
+            AZ::TransformBus::EventResult(entityTransform, m_targetEntityId, &AZ::TransformBus::Events::GetWorldTM);
             m_destination = entityTransform.GetTranslation();
         }
 

+ 1 - 1
Gems/LmbrCentral/Code/include/LmbrCentral/Scripting/TagComponentBus.h

@@ -68,7 +68,7 @@ namespace LmbrCentral
                 AZ::EBusConnectionPolicy<Bus>::Connect(busPtr, context, handler, connectLock, id);
 
                 AZ::EBusAggregateResults<AZ::EntityId> results;
-                EBUS_EVENT_ID_RESULT(results, id, TagGlobalRequestBus, RequestTaggedEntities);
+                TagGlobalRequestBus::EventResult(results, id, &TagGlobalRequestBus::Events::RequestTaggedEntities);
                 for (const AZ::EntityId& entity : results.values)
                 {
                     handler->OnEntityTagAdded(entity);