Explorar el Código

Moving GameLift integration into a new gem MPSGameLift so that we can merge these changes into development without requiring developers to use AWS 3rd parties.

Signed-off-by: Gene Walters <[email protected]>
Gene Walters hace 2 años
padre
commit
e5781d419c
Se han modificado 60 ficheros con 972 adiciones y 108 borrados
  1. 0 9
      Gem/Code/CMakeLists.txt
  2. 0 35
      Gem/Code/Source/MultiplayerSampleModule.cpp
  3. 1 0
      Gem/Code/enabled_gems.cmake
  4. 0 11
      Gem/Code/multiplayersample_gamelift_client_files.cmake
  5. 0 11
      Gem/Code/multiplayersample_gamelift_server_files.cmake
  6. 0 0
      MPSGameLift/.gitignore
  7. 22 0
      MPSGameLift/CMakeLists.txt
  8. 301 0
      MPSGameLift/Code/CMakeLists.txt
  9. 31 0
      MPSGameLift/Code/Include/MPSGameLift/MPSGameLiftBus.h
  10. 4 0
      MPSGameLift/Code/Platform/Android/PAL_android.cmake
  11. 3 0
      MPSGameLift/Code/Platform/Android/mpsgamelift_api_files.cmake
  12. 8 0
      MPSGameLift/Code/Platform/Android/mpsgamelift_private_files.cmake
  13. 8 0
      MPSGameLift/Code/Platform/Android/mpsgamelift_shared_files.cmake
  14. 4 0
      MPSGameLift/Code/Platform/Linux/PAL_linux.cmake
  15. 3 0
      MPSGameLift/Code/Platform/Linux/mpsgamelift_api_files.cmake
  16. 3 0
      MPSGameLift/Code/Platform/Linux/mpsgamelift_editor_api_files.cmake
  17. 8 0
      MPSGameLift/Code/Platform/Linux/mpsgamelift_private_files.cmake
  18. 8 0
      MPSGameLift/Code/Platform/Linux/mpsgamelift_shared_files.cmake
  19. 4 0
      MPSGameLift/Code/Platform/Mac/PAL_mac.cmake
  20. 3 0
      MPSGameLift/Code/Platform/Mac/mpsgamelift_api_files.cmake
  21. 3 0
      MPSGameLift/Code/Platform/Mac/mpsgamelift_editor_api_files.cmake
  22. 8 0
      MPSGameLift/Code/Platform/Mac/mpsgamelift_private_files.cmake
  23. 8 0
      MPSGameLift/Code/Platform/Mac/mpsgamelift_shared_files.cmake
  24. 4 0
      MPSGameLift/Code/Platform/Windows/PAL_windows.cmake
  25. 3 0
      MPSGameLift/Code/Platform/Windows/mpsgamelift_api_files.cmake
  26. 3 0
      MPSGameLift/Code/Platform/Windows/mpsgamelift_editor_api_files.cmake
  27. 8 0
      MPSGameLift/Code/Platform/Windows/mpsgamelift_private_files.cmake
  28. 8 0
      MPSGameLift/Code/Platform/Windows/mpsgamelift_shared_files.cmake
  29. 4 0
      MPSGameLift/Code/Platform/iOS/PAL_ios.cmake
  30. 3 0
      MPSGameLift/Code/Platform/iOS/mpsgamelift_api_files.cmake
  31. 8 0
      MPSGameLift/Code/Platform/iOS/mpsgamelift_private_files.cmake
  32. 8 0
      MPSGameLift/Code/Platform/iOS/mpsgamelift_shared_files.cmake
  33. 15 15
      MPSGameLift/Code/Source/MPSGameLiftClientSystemComponent.cpp
  34. 4 4
      MPSGameLift/Code/Source/MPSGameLiftClientSystemComponent.h
  35. 75 0
      MPSGameLift/Code/Source/MPSGameLiftModuleInterface.h
  36. 19 19
      MPSGameLift/Code/Source/MPSGameLiftServerSystemComponent.cpp
  37. 3 3
      MPSGameLift/Code/Source/MPSGameLiftServerSystemComponent.h
  38. 38 0
      MPSGameLift/Code/Source/Tools/MPSGameLiftEditorModule.cpp
  39. 54 0
      MPSGameLift/Code/Source/Tools/MPSGameLiftEditorSystemComponent.cpp
  40. 33 0
      MPSGameLift/Code/Source/Tools/MPSGameLiftEditorSystemComponent.h
  41. 21 0
      MPSGameLift/Code/Source/Unified/MPSGameLiftModule.cpp
  42. 76 0
      MPSGameLift/Code/Source/Unified/MPSGameLiftSystemComponent.cpp
  43. 41 0
      MPSGameLift/Code/Source/Unified/MPSGameLiftSystemComponent.h
  44. 4 0
      MPSGameLift/Code/Tests/Tools/MPSGameLiftEditorTest.cpp
  45. 4 0
      MPSGameLift/Code/Tests/Unified/MPSGameLiftTest.cpp
  46. 4 0
      MPSGameLift/Code/mpsgamelift_api_files.cmake
  47. 11 0
      MPSGameLift/Code/mpsgamelift_client_files.cmake
  48. 4 0
      MPSGameLift/Code/mpsgamelift_editor_api_files.cmake
  49. 5 0
      MPSGameLift/Code/mpsgamelift_editor_private_files.cmake
  50. 4 0
      MPSGameLift/Code/mpsgamelift_editor_shared_files.cmake
  51. 4 0
      MPSGameLift/Code/mpsgamelift_editor_tests_files.cmake
  52. 6 0
      MPSGameLift/Code/mpsgamelift_private_files.cmake
  53. 11 0
      MPSGameLift/Code/mpsgamelift_server_files.cmake
  54. 4 0
      MPSGameLift/Code/mpsgamelift_shared_files.cmake
  55. 4 0
      MPSGameLift/Code/mpsgamelift_tests_files.cmake
  56. 18 0
      MPSGameLift/Registry/assetprocessor_settings.setreg
  57. 25 0
      MPSGameLift/gem.json
  58. 3 0
      MPSGameLift/preview.png
  59. 2 1
      README_GAMELIFT.md
  60. 1 0
      project.json

+ 0 - 9
Gem/Code/CMakeLists.txt

@@ -14,7 +14,6 @@ ly_add_target(
         multiplayersample_autogen_files.cmake
         multiplayersample_files.cmake
         multiplayersample_client_files.cmake
-        multiplayersample_gamelift_client_files.cmake
         ${pal_dir}/multiplayersample_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
     INCLUDE_DIRECTORIES
         PRIVATE
@@ -40,8 +39,6 @@ ly_add_target(
             Gem::ImGui.Static
             Gem::LyShine.Static
             Gem::GameState.Static
-            Gem::AWSCore.Static
-            Gem::AWSGameLift.Client.Static
     AUTOGEN_RULES
         *.AutoComponent.xml,AutoComponent_Header.jinja,$path/$fileprefix.AutoComponent.h
         *.AutoComponent.xml,AutoComponent_Source.jinja,$path/$fileprefix.AutoComponent.cpp
@@ -55,7 +52,6 @@ ly_add_target(
     FILES_CMAKE
         multiplayersample_autogen_files.cmake
         multiplayersample_files.cmake
-        multiplayersample_gamelift_server_files.cmake
         multiplayersample_server_files.cmake
         ${pal_dir}/multiplayersample_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
     INCLUDE_DIRECTORIES
@@ -75,7 +71,6 @@ ly_add_target(
             Gem::Multiplayer.Server.Static
             Gem::PhysX.Static
             Gem::GameState.Static
-            Gem::AWSGameLift.Server.Static
     AUTOGEN_RULES
         *.AutoComponent.xml,AutoComponent_Header.jinja,$path/$fileprefix.AutoComponent.h
         *.AutoComponent.xml,AutoComponent_Source.jinja,$path/$fileprefix.AutoComponent.cpp
@@ -90,7 +85,6 @@ ly_add_target(
         multiplayersample_autogen_files.cmake
         multiplayersample_files.cmake
         multiplayersample_client_files.cmake
-        multiplayersample_gamelift_client_files.cmake
         multiplayersample_server_files.cmake
         ${pal_dir}/multiplayersample_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
     INCLUDE_DIRECTORIES
@@ -116,9 +110,6 @@ ly_add_target(
             Gem::ImGui.Static
             Gem::LyShine.Static
             Gem::GameState.Static
-            Gem::AWSCore.Static
-            Gem::AWSGameLift.Client.Static
-            Gem::AWSGameLift.Server.Static
     AUTOGEN_RULES
         *.AutoComponent.xml,AutoComponent_Header.jinja,$path/$fileprefix.AutoComponent.h
         *.AutoComponent.xml,AutoComponent_Source.jinja,$path/$fileprefix.AutoComponent.cpp

+ 0 - 35
Gem/Code/Source/MultiplayerSampleModule.cpp

@@ -19,11 +19,6 @@
     #include <Components/UI/UiMatchPlayerCoinCountsComponent.h>
     #include <Components/UI/UiRestBetweenRoundsComponent.h>
     #include <Components/UI/UiStartMenuComponent.h>
-    #include <Source/MultiplayerSampleAWSGameLiftClientSystemComponent.h>
-#endif
-#if AZ_TRAIT_SERVER  && !AZ_TRAIT_CLIENT
-    #include <Source/MultiplayerSampleAWSGameLiftServerSystemComponent.h>
-    #include <AzCore/Console/IConsole.h>
 #endif
 
 #include <Source/AutoGen/AutoComponentTypes.h>
@@ -57,10 +52,6 @@ namespace MultiplayerSample
                     UiMatchPlayerCoinCountsComponent::CreateDescriptor(),
                     UiRestBetweenRoundsComponent::CreateDescriptor(),
                     UiStartMenuComponent::CreateDescriptor(),
-                    MultiplayerSampleAWSGameLiftClientSystemComponent::CreateDescriptor(),
-                #endif
-                #if AZ_TRAIT_SERVER && !AZ_TRAIT_CLIENT
-                    MultiplayerSampleAWSGameLiftServerSystemComponent::CreateDescriptor(),
                 #endif
             });
 
@@ -74,33 +65,7 @@ namespace MultiplayerSample
         {
             AZ::ComponentTypeList requiredSystemComponents{
                 azrtti_typeid<MultiplayerSampleSystemComponent>(),
-                #if AZ_TRAIT_CLIENT
-                    azrtti_typeid<MultiplayerSampleAWSGameLiftClientSystemComponent>(),
-                #endif
             };
-
-            // Only activate the MultiplayerSample AWS GameLift server system component if this a dedicated server running on GameLift.
-            #if AZ_TRAIT_SERVER && !AZ_TRAIT_CLIENT
-                if (const auto console = AZ::Interface<AZ::IConsole>::Get())
-                {
-                    bool sv_gameLiftEnabled = false;
-                    if (console->GetCvarValue("sv_gameLiftEnabled", sv_gameLiftEnabled) == AZ::GetValueResult::Success)
-                    {
-                        if (sv_gameLiftEnabled)
-                        {
-                            requiredSystemComponents.push_back(azrtti_typeid<MultiplayerSampleAWSGameLiftServerSystemComponent>());
-                        }
-                    }
-                    else
-                    {
-                        AZ_Assert(false, "MultiplayerSample expecting to access an invalid sv_gameLiftEnabled. Please update code to properly check if GameLift is enabled in order to enable it's custom GameLift server system component.")
-                    }
-                }
-                else
-                {
-                    AZ_Assert(false, "MultiplayerSample expecting to check AZ::Console, but it's not available. Please update code to properly check if this server is running on GameLift.")
-                }
-            #endif
             
             return requiredSystemComponents;
         }

+ 1 - 0
Gem/Code/enabled_gems.cmake

@@ -67,4 +67,5 @@ set(ENABLED_GEMS
     Profiler
     Stars
     AWSGameLift
+    MPSGameLift
 )

+ 0 - 11
Gem/Code/multiplayersample_gamelift_client_files.cmake

@@ -1,11 +0,0 @@
-#
-# Copyright (c) Contributors to the Open 3D Engine Project
-#
-# SPDX-License-Identifier: Apache-2.0 OR MIT
-#
-#
-
-set(FILES
-    Source/MultiplayerSampleAWSGameLiftClientSystemComponent.cpp
-    Source/MultiplayerSampleAWSGameLiftClientSystemComponent.h
-)

+ 0 - 11
Gem/Code/multiplayersample_gamelift_server_files.cmake

@@ -1,11 +0,0 @@
-#
-# Copyright (c) Contributors to the Open 3D Engine Project
-#
-# SPDX-License-Identifier: Apache-2.0 OR MIT
-#
-#
-
-set(FILES
-    Source/MultiplayerSampleAWSGameLiftServerSystemComponent.cpp
-    Source/MultiplayerSampleAWSGameLiftServerSystemComponent.h
-)

+ 0 - 0
MPSGameLift/.gitignore


+ 22 - 0
MPSGameLift/CMakeLists.txt

@@ -0,0 +1,22 @@
+
+# Query the gem name from the gem.json file if possible
+# otherwise fallback to using MPSGameLift
+o3de_find_ancestor_gem_root(gem_path gem_name "${CMAKE_CURRENT_SOURCE_DIR}")
+if (NOT gem_name)
+    set(gem_name "MPSGameLift")
+endif()
+
+# Fallback to using the current source CMakeLists.txt directory as the gem root path
+if (NOT gem_path)
+    set(gem_path ${CMAKE_CURRENT_SOURCE_DIR})
+endif()
+
+set(gem_json ${gem_path}/gem.json)
+
+o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path)
+
+o3de_pal_dir(pal_dir ${CMAKE_CURRENT_SOURCE_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
+
+ly_add_external_target_path(${CMAKE_CURRENT_SOURCE_DIR}/3rdParty)
+
+add_subdirectory(Code)

+ 301 - 0
MPSGameLift/Code/CMakeLists.txt

@@ -0,0 +1,301 @@
+
+# Currently we are in the Code folder: ${CMAKE_CURRENT_LIST_DIR}
+# Get the platform specific folder ${pal_dir} for the current folder: ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}
+# Note: o3de_pal_dir will take care of the details for us, as this may be a restricted platform
+#       in which case it will see if that platform is present here or in the restricted folder.
+#       i.e. It could here in our gem : Gems/MPSGameLift/Code/Platform/<platorm_name>  or
+#            <restricted_folder>/<platform_name>/Gems/MPSGameLift/Code
+o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
+
+# Now that we have the platform abstraction layer (PAL) folder for this folder, thats where we will find the
+# traits for this platform. Traits for a platform are defines for things like whether or not something in this gem
+# is supported by this platform.
+include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
+
+# Check to see if building the Gem Modules are supported for the current platform
+if(NOT PAL_TRAIT_MPSGAMELIFT_SUPPORTED)
+    return()
+endif()
+
+# The ${gem_name}.API target declares the common interface that users of this gem should depend on in their targets
+ly_add_target(
+    NAME ${gem_name}.API INTERFACE
+    NAMESPACE Gem
+    FILES_CMAKE
+        mpsgamelift_api_files.cmake
+        ${pal_dir}/mpsgamelift_api_files.cmake
+    INCLUDE_DIRECTORIES
+        INTERFACE
+            Include
+    BUILD_DEPENDENCIES
+        INTERFACE
+           AZ::AzCore
+)
+
+# The ${gem_name}.Private.Object targets are internal targets
+# They should not be used outside of this Gems CMakeLists.txt
+ly_add_target(
+    NAME ${gem_name}.Client.Private.Object STATIC
+    NAMESPACE Gem
+    FILES_CMAKE
+        mpsgamelift_private_files.cmake
+        ${pal_dir}/mpsgamelift_private_files.cmake
+        mpsgamelift_client_files.cmake
+    TARGET_PROPERTIES
+        O3DE_PRIVATE_TARGET TRUE
+    INCLUDE_DIRECTORIES
+        PRIVATE
+            Include
+            Source
+    BUILD_DEPENDENCIES
+        PUBLIC
+            AZ::AzCore
+            AZ::AzFramework
+            Gem::Multiplayer.Client
+        PRIVATE
+            Gem::Multiplayer.Client.Static
+            Gem::AWSCore.Static
+            Gem::AWSGameLift.Client.Static
+)
+
+ly_add_target(
+    NAME ${gem_name}.Server.Private.Object STATIC
+    NAMESPACE Gem
+    FILES_CMAKE
+        mpsgamelift_private_files.cmake
+        ${pal_dir}/mpsgamelift_private_files.cmake
+        mpsgamelift_server_files.cmake 
+    TARGET_PROPERTIES
+        O3DE_PRIVATE_TARGET TRUE
+    INCLUDE_DIRECTORIES
+        PRIVATE
+            Include
+            Source
+    BUILD_DEPENDENCIES
+        PUBLIC
+            AZ::AzCore
+            AZ::AzFramework
+            Gem::Multiplayer.Server
+        PRIVATE
+            Gem::Multiplayer.Server.Static
+            Gem::AWSGameLift.Server.Static
+)
+
+ly_add_target(
+    NAME ${gem_name}.Unified.Private.Object STATIC
+    NAMESPACE Gem
+    FILES_CMAKE
+        mpsgamelift_private_files.cmake
+        mpsgamelift_client_files.cmake
+        ${pal_dir}/mpsgamelift_private_files.cmake 
+    TARGET_PROPERTIES
+        O3DE_PRIVATE_TARGET TRUE
+    INCLUDE_DIRECTORIES
+        PRIVATE
+            Include
+            Source
+    BUILD_DEPENDENCIES
+        PUBLIC
+            AZ::AzCore
+            AZ::AzFramework
+            Gem::Multiplayer
+        PRIVATE
+            Gem::Multiplayer.Unified.Static
+            Gem::AWSCore.Static
+            Gem::AWSGameLift.Client.Static
+)
+
+# Here add ${gem_name} target, it depends on the Private Object library and Public API interface
+ly_add_target(
+    NAME ${gem_name}.Client ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
+    NAMESPACE Gem
+    FILES_CMAKE
+        mpsgamelift_shared_files.cmake
+        ${pal_dir}/mpsgamelift_shared_files.cmake
+    INCLUDE_DIRECTORIES
+        PUBLIC
+            Include
+        PRIVATE
+            Source
+    BUILD_DEPENDENCIES
+        PUBLIC
+            Gem::${gem_name}.API
+        PRIVATE
+            Gem::Multiplayer.Client.Static
+            Gem::${gem_name}.Client.Private.Object
+)
+
+ly_add_target(
+    NAME ${gem_name}.Server ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
+    NAMESPACE Gem
+    FILES_CMAKE
+        mpsgamelift_shared_files.cmake
+        ${pal_dir}/mpsgamelift_shared_files.cmake
+    INCLUDE_DIRECTORIES
+        PUBLIC
+            Include
+        PRIVATE
+            Source
+    BUILD_DEPENDENCIES
+        PUBLIC
+            Gem::${gem_name}.API
+        PRIVATE
+            Gem::Multiplayer.Server.Static
+            Gem::${gem_name}.Server.Private.Object
+)
+
+ly_add_target(
+    NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
+    NAMESPACE Gem
+    FILES_CMAKE
+        mpsgamelift_shared_files.cmake
+        ${pal_dir}/mpsgamelift_shared_files.cmake
+    INCLUDE_DIRECTORIES
+        PUBLIC
+            Include
+        PRIVATE
+            Source
+    BUILD_DEPENDENCIES
+        PUBLIC
+            Gem::${gem_name}.API
+        PRIVATE
+            Gem::${gem_name}.Unified.Private.Object
+)
+
+# By default, we will specify that the above target ${gem_name} would be used by
+# Client and Server type targets when this gem is enabled.  If you don't want it
+# active in Clients or Servers by default, delete one of both of the following lines:
+ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name}.Client)
+ly_create_alias(NAME ${gem_name}.Servers NAMESPACE Gem TARGETS Gem::${gem_name}.Server)
+ly_create_alias(NAME ${gem_name}.Unified NAMESPACE Gem TARGETS Gem::${gem_name})
+
+# For the Client and Server variants of ${gem_name} Gem, an alias to the ${gem_name}.API target will be made
+ly_create_alias(NAME ${gem_name}.Clients.API NAMESPACE Gem TARGETS Gem::${gem_name}.API)
+ly_create_alias(NAME ${gem_name}.Servers.API NAMESPACE Gem TARGETS Gem::${gem_name}.API)
+ly_create_alias(NAME ${gem_name}.Unified.API NAMESPACE Gem TARGETS Gem::${gem_name}.API)
+
+# If we are on a host platform, we want to add the host tools targets like the ${gem_name}.Editor MODULE target
+if(PAL_TRAIT_BUILD_HOST_TOOLS)
+    # The ${gem_name}.Editor.API target can be used by other gems that want to interact with the ${gem_name}.Editor module
+    ly_add_target(
+        NAME ${gem_name}.Editor.API INTERFACE
+        NAMESPACE Gem
+        FILES_CMAKE
+            mpsgamelift_editor_api_files.cmake
+            ${pal_dir}/mpsgamelift_editor_api_files.cmake
+        INCLUDE_DIRECTORIES
+            INTERFACE
+                Include
+        BUILD_DEPENDENCIES
+            INTERFACE
+                AZ::AzToolsFramework
+    )
+
+    # The ${gem_name}.Editor.Private.Object target is an internal target
+    # which is only to be used by this gems CMakeLists.txt and any subdirectories
+    # Other gems should not use this target
+    ly_add_target(
+        NAME ${gem_name}.Editor.Private.Object STATIC
+        NAMESPACE Gem
+        FILES_CMAKE
+            mpsgamelift_editor_private_files.cmake
+        TARGET_PROPERTIES
+            O3DE_PRIVATE_TARGET TRUE
+        INCLUDE_DIRECTORIES
+            PRIVATE
+                Include
+                Source
+        BUILD_DEPENDENCIES
+            PUBLIC
+                AZ::AzToolsFramework
+                $<TARGET_OBJECTS:Gem::${gem_name}.Unified.Private.Object>
+    )
+
+    ly_add_target(
+        NAME ${gem_name}.Editor GEM_MODULE
+        NAMESPACE Gem
+        AUTOMOC
+        FILES_CMAKE
+            mpsgamelift_editor_shared_files.cmake
+        INCLUDE_DIRECTORIES
+            PRIVATE
+                Source
+            PUBLIC
+                Include
+        BUILD_DEPENDENCIES
+            PUBLIC
+                Gem::${gem_name}.Editor.API
+            PRIVATE
+                Gem::${gem_name}.Editor.Private.Object
+    )
+
+    # By default, we will specify that the above target ${gem_name} would be used by
+    # Tool and Builder type targets when this gem is enabled.  If you don't want it
+    # active in Tools or Builders by default, delete one of both of the following lines:
+    ly_create_alias(NAME ${gem_name}.Tools    NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
+    ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
+
+    # For the Tools and Builders variants of ${gem_name} Gem, an alias to the ${gem_name}.Editor API target will be made
+    ly_create_alias(NAME ${gem_name}.Tools.API NAMESPACE Gem TARGETS Gem::${gem_name}.Editor.API)
+    ly_create_alias(NAME ${gem_name}.Builders.API NAMESPACE Gem TARGETS Gem::${gem_name}.Editor.API)
+
+endif()
+
+################################################################################
+# Tests
+################################################################################
+# See if globally, tests are supported
+if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
+    # We globally support tests, see if we support tests on this platform for ${gem_name}.Tests
+    if(PAL_TRAIT_MPSGAMELIFT_TEST_SUPPORTED)
+        # We support ${gem_name}.Tests on this platform, add dependency on the Private Object target
+        ly_add_target(
+            NAME ${gem_name}.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
+            NAMESPACE Gem
+            FILES_CMAKE
+                mpsgamelift_tests_files.cmake
+            INCLUDE_DIRECTORIES
+                PRIVATE
+                    Tests
+                    Source
+            BUILD_DEPENDENCIES
+                PRIVATE
+                    AZ::AzTest
+                    AZ::AzFramework
+                    Gem::${gem_name}.Unified.Private.Object
+        )
+
+        # Add ${gem_name}.Tests to googletest
+        ly_add_googletest(
+            NAME Gem::${gem_name}.Tests
+        )
+    endif()
+
+    # If we are a host platform we want to add tools test like editor tests here
+    if(PAL_TRAIT_BUILD_HOST_TOOLS)
+        # We are a host platform, see if Editor tests are supported on this platform
+        if(PAL_TRAIT_MPSGAMELIFT_EDITOR_TEST_SUPPORTED)
+            # We support ${gem_name}.Editor.Tests on this platform, add ${gem_name}.Editor.Tests target which depends on
+            # private ${gem_name}.Editor.Private.Object target
+            ly_add_target(
+                NAME ${gem_name}.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
+                NAMESPACE Gem
+                FILES_CMAKE
+                    mpsgamelift_editor_tests_files.cmake
+                INCLUDE_DIRECTORIES
+                    PRIVATE
+                        Tests
+                        Source
+                BUILD_DEPENDENCIES
+                    PRIVATE
+                        AZ::AzTest
+                        Gem::${gem_name}.Unified.Private.Object
+            )
+
+            # Add ${gem_name}.Editor.Tests to googletest
+            ly_add_googletest(
+                NAME Gem::${gem_name}.Editor.Tests
+            )
+        endif()
+    endif()
+endif()

+ 31 - 0
MPSGameLift/Code/Include/MPSGameLift/MPSGameLiftBus.h

@@ -0,0 +1,31 @@
+
+#pragma once
+
+#include <AzCore/EBus/EBus.h>
+#include <AzCore/Interface/Interface.h>
+
+namespace MPSGameLift
+{
+    class MPSGameLiftRequests
+    {
+    public:
+        AZ_RTTI(MPSGameLiftRequests, "{973EF127-5D1B-43EF-A03B-CEFCDCF5CF16}");
+        virtual ~MPSGameLiftRequests() = default;
+        // Put your public methods here
+    };
+    
+    class MPSGameLiftBusTraits
+        : public AZ::EBusTraits
+    {
+    public:
+        //////////////////////////////////////////////////////////////////////////
+        // EBusTraits overrides
+        static constexpr AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
+        static constexpr AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
+        //////////////////////////////////////////////////////////////////////////
+    };
+
+    using MPSGameLiftRequestBus = AZ::EBus<MPSGameLiftRequests, MPSGameLiftBusTraits>;
+    using MPSGameLiftInterface = AZ::Interface<MPSGameLiftRequests>;
+
+} // namespace MPSGameLift

+ 4 - 0
MPSGameLift/Code/Platform/Android/PAL_android.cmake

@@ -0,0 +1,4 @@
+
+set(PAL_TRAIT_MPSGAMELIFT_SUPPORTED TRUE)
+set(PAL_TRAIT_MPSGAMELIFT_TEST_SUPPORTED FALSE)
+set(PAL_TRAIT_MPSGAMELIFT_EDITOR_TEST_SUPPORTED FALSE)

+ 3 - 0
MPSGameLift/Code/Platform/Android/mpsgamelift_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 8 - 0
MPSGameLift/Code/Platform/Android/mpsgamelift_private_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Android
+# i.e. ../Source/Android/MPSGameLiftAndroid.cpp
+#      ../Source/Android/MPSGameLiftAndroid.h
+#      ../Include/Android/MPSGameLiftAndroid.h
+
+set(FILES
+)

+ 8 - 0
MPSGameLift/Code/Platform/Android/mpsgamelift_shared_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Android
+# i.e. ../Source/Android/MPSGameLiftAndroid.cpp
+#      ../Source/Android/MPSGameLiftAndroid.h
+#      ../Include/Android/MPSGameLiftAndroid.h
+
+set(FILES
+)

+ 4 - 0
MPSGameLift/Code/Platform/Linux/PAL_linux.cmake

@@ -0,0 +1,4 @@
+
+set(PAL_TRAIT_MPSGAMELIFT_SUPPORTED TRUE)
+set(PAL_TRAIT_MPSGAMELIFT_TEST_SUPPORTED FALSE)
+set(PAL_TRAIT_MPSGAMELIFT_EDITOR_TEST_SUPPORTED FALSE)

+ 3 - 0
MPSGameLift/Code/Platform/Linux/mpsgamelift_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 3 - 0
MPSGameLift/Code/Platform/Linux/mpsgamelift_editor_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 8 - 0
MPSGameLift/Code/Platform/Linux/mpsgamelift_private_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Linux
+# i.e. ../Source/Linux/MPSGameLiftLinux.cpp
+#      ../Source/Linux/MPSGameLiftLinux.h
+#      ../Include/Linux/MPSGameLiftLinux.h
+
+set(FILES
+)

+ 8 - 0
MPSGameLift/Code/Platform/Linux/mpsgamelift_shared_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Linux
+# i.e. ../Source/Linux/MPSGameLiftLinux.cpp
+#      ../Source/Linux/MPSGameLiftLinux.h
+#      ../Include/Linux/MPSGameLiftLinux.h
+
+set(FILES
+)

+ 4 - 0
MPSGameLift/Code/Platform/Mac/PAL_mac.cmake

@@ -0,0 +1,4 @@
+
+set(PAL_TRAIT_MPSGAMELIFT_SUPPORTED TRUE)
+set(PAL_TRAIT_MPSGAMELIFT_TEST_SUPPORTED FALSE)
+set(PAL_TRAIT_MPSGAMELIFT_EDITOR_TEST_SUPPORTED FALSE)

+ 3 - 0
MPSGameLift/Code/Platform/Mac/mpsgamelift_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 3 - 0
MPSGameLift/Code/Platform/Mac/mpsgamelift_editor_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 8 - 0
MPSGameLift/Code/Platform/Mac/mpsgamelift_private_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Mac
+# i.e. ../Source/Mac/MPSGameLiftMac.cpp
+#      ../Source/Mac/MPSGameLiftMac.h
+#      ../Include/Mac/MPSGameLiftMac.h
+
+set(FILES
+)

+ 8 - 0
MPSGameLift/Code/Platform/Mac/mpsgamelift_shared_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Mac
+# i.e. ../Source/Mac/MPSGameLiftMac.cpp
+#      ../Source/Mac/MPSGameLiftMac.h
+#      ../Include/Mac/MPSGameLiftMac.h
+
+set(FILES
+)

+ 4 - 0
MPSGameLift/Code/Platform/Windows/PAL_windows.cmake

@@ -0,0 +1,4 @@
+
+set(PAL_TRAIT_MPSGAMELIFT_SUPPORTED TRUE)
+set(PAL_TRAIT_MPSGAMELIFT_TEST_SUPPORTED FALSE)
+set(PAL_TRAIT_MPSGAMELIFT_EDITOR_TEST_SUPPORTED FALSE)

+ 3 - 0
MPSGameLift/Code/Platform/Windows/mpsgamelift_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 3 - 0
MPSGameLift/Code/Platform/Windows/mpsgamelift_editor_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 8 - 0
MPSGameLift/Code/Platform/Windows/mpsgamelift_private_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Windows
+# i.e. ../Source/Windows/MPSGameLiftWindows.cpp
+#      ../Source/Windows/MPSGameLiftWindows.h
+#      ../Include/Windows/MPSGameLiftWindows.h
+
+set(FILES
+)

+ 8 - 0
MPSGameLift/Code/Platform/Windows/mpsgamelift_shared_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Windows
+# i.e. ../Source/Windows/MPSGameLiftWindows.cpp
+#      ../Source/Windows/MPSGameLiftWindows.h
+#      ../Include/Windows/MPSGameLiftWindows.h
+
+set(FILES
+)

+ 4 - 0
MPSGameLift/Code/Platform/iOS/PAL_ios.cmake

@@ -0,0 +1,4 @@
+
+set(PAL_TRAIT_MPSGAMELIFT_SUPPORTED TRUE)
+set(PAL_TRAIT_MPSGAMELIFT_TEST_SUPPORTED FALSE)
+set(PAL_TRAIT_MPSGAMELIFT_EDITOR_TEST_SUPPORTED FALSE)

+ 3 - 0
MPSGameLift/Code/Platform/iOS/mpsgamelift_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 8 - 0
MPSGameLift/Code/Platform/iOS/mpsgamelift_private_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for iOS
+# i.e. ../Source/iOS/MPSGameLiftiOS.cpp
+#      ../Source/iOS/MPSGameLiftiOS.h
+#      ../Include/iOS/MPSGameLiftiOS.h
+
+set(FILES
+)

+ 8 - 0
MPSGameLift/Code/Platform/iOS/mpsgamelift_shared_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for iOS
+# i.e. ../Source/iOS/MPSGameLiftiOS.cpp
+#      ../Source/iOS/MPSGameLiftiOS.h
+#      ../Include/iOS/MPSGameLiftiOS.h
+
+set(FILES
+)

+ 15 - 15
Gem/Code/Source/MultiplayerSampleAWSGameLiftClientSystemComponent.cpp → MPSGameLift/Code/Source/MPSGameLiftClientSystemComponent.cpp

@@ -5,58 +5,58 @@
  *
  */
 
-#include "MultiplayerSampleAWSGameLiftClientSystemComponent.h"
+#include "MPSGameLiftClientSystemComponent.h"
 
 #include <AzCore/Serialization/SerializeContext.h>
 #include <Request/AWSGameLiftRequestBus.h>
 #include <Request/AWSGameLiftSessionRequestBus.h>
 #include <Request/AWSGameLiftJoinSessionRequest.h>
 
-namespace MultiplayerSample
+namespace MPSGameLift
 {
-    void MultiplayerSampleAWSGameLiftClientSystemComponent::Reflect(AZ::ReflectContext* context)
+    void MPSGameLiftClientSystemComponent::Reflect(AZ::ReflectContext* context)
     {
         if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
         {
-            serialize->Class<MultiplayerSampleAWSGameLiftClientSystemComponent, AZ::Component>()
+            serialize->Class<MPSGameLiftClientSystemComponent, AZ::Component>()
                 ->Version(0)
                 ;
         }
     }
 
-    void MultiplayerSampleAWSGameLiftClientSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
+    void MPSGameLiftClientSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
     {
-        provided.push_back(AZ_CRC_CE("MultiplayerSampleAWSGameLiftClientService"));
+        provided.push_back(AZ_CRC_CE("MPSGameLiftClientService"));
     }
 
-    void MultiplayerSampleAWSGameLiftClientSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
+    void MPSGameLiftClientSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
     {
-        incompatible.push_back(AZ_CRC_CE("MultiplayerSampleAWSGameLiftClientService"));
+        incompatible.push_back(AZ_CRC_CE("MPSGameLiftClientService"));
     }
 
-    void MultiplayerSampleAWSGameLiftClientSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
+    void MPSGameLiftClientSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
     {
         required.push_back(AZ_CRC_CE("AWSGameLiftClientService"));
     }
 
-    void MultiplayerSampleAWSGameLiftClientSystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent)
+    void MPSGameLiftClientSystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent)
     {
     }
 
-    void MultiplayerSampleAWSGameLiftClientSystemComponent::Init()
+    void MPSGameLiftClientSystemComponent::Init()
     {
         m_playerId = AZ::Uuid::Create().ToString<AZStd::string>();
     }
 
-    void MultiplayerSampleAWSGameLiftClientSystemComponent::Activate()
+    void MPSGameLiftClientSystemComponent::Activate()
     {
         AWSGameLift::AWSGameLiftRequestBus::Broadcast(&AWSGameLift::AWSGameLiftRequestBus::Events::ConfigureGameLiftClient, "");
     } 
-    void MultiplayerSampleAWSGameLiftClientSystemComponent::Deactivate()
+    void MPSGameLiftClientSystemComponent::Deactivate()
     {
     }
 
-    void MultiplayerSampleAWSGameLiftClientSystemComponent::JoinSession(const AZ::ConsoleCommandContainer& consoleFunctionParameters)
+    void MPSGameLiftClientSystemComponent::JoinSession(const AZ::ConsoleCommandContainer& consoleFunctionParameters)
     {
         if (consoleFunctionParameters.size() != 1)
         {
@@ -67,7 +67,7 @@ namespace MultiplayerSample
         JoinSessionInternal(consoleFunctionParameters[0], m_playerId);
     }
 
-    void MultiplayerSampleAWSGameLiftClientSystemComponent::JoinSessionInternal(const AZStd::string& sessionId, const AZStd::string& playerId)
+    void MPSGameLiftClientSystemComponent::JoinSessionInternal(const AZStd::string& sessionId, const AZStd::string& playerId)
     {
         AWSGameLift::AWSGameLiftJoinSessionRequest request;
         request.m_sessionId = sessionId;

+ 4 - 4
Gem/Code/Source/MultiplayerSampleAWSGameLiftClientSystemComponent.h → MPSGameLift/Code/Source/MPSGameLiftClientSystemComponent.h

@@ -10,13 +10,13 @@
 #include <AzCore/Component/Component.h>
 #include <AzCore/Console/IConsole.h>
 
-namespace MultiplayerSample
+namespace MPSGameLift
 {
-    class MultiplayerSampleAWSGameLiftClientSystemComponent
+    class MPSGameLiftClientSystemComponent
         : public AZ::Component
     {
     public:
-        AZ_COMPONENT(MultiplayerSampleAWSGameLiftClientSystemComponent, "{09b3eb68-8a50-485b-a4b0-38c5626ca78e}");
+        AZ_COMPONENT(MPSGameLiftClientSystemComponent, "{939D9813-2DCA-4625-B4E1-E63A6A652A26}");
 
         static void Reflect(AZ::ReflectContext* context);
 
@@ -32,7 +32,7 @@ namespace MultiplayerSample
         void Deactivate() override;
 
         void JoinSession(const AZ::ConsoleCommandContainer& consoleFunctionParameters);
-        AZ_CONSOLEFUNC(MultiplayerSampleAWSGameLiftClientSystemComponent, JoinSession, AZ::ConsoleFunctorFlags::DontReplicate, "Join an existing game session");
+        AZ_CONSOLEFUNC(MPSGameLiftClientSystemComponent, JoinSession, AZ::ConsoleFunctorFlags::DontReplicate, "Join an existing game session");
 
     private:
         void JoinSessionInternal(const AZStd::string& sessionId, const AZStd::string& playerId);

+ 75 - 0
MPSGameLift/Code/Source/MPSGameLiftModuleInterface.h

@@ -0,0 +1,75 @@
+
+#include <AzCore/Memory/SystemAllocator.h>
+#include <AzCore/Module/Module.h>
+#include <Unified/MPSGameLiftSystemComponent.h>
+#if AZ_TRAIT_CLIENT
+    #include <MPSGameLiftClientSystemComponent.h>
+#endif
+
+#if AZ_TRAIT_SERVER && !AZ_TRAIT_CLIENT
+    #include <MPSGameLiftServerSystemComponent.h>
+    #include <AzCore/Console/IConsole.h>
+#endif
+
+namespace MPSGameLift
+{
+    class MPSGameLiftModuleInterface
+        : public AZ::Module
+    {
+    public:
+        AZ_RTTI(MPSGameLiftModuleInterface, "{2CB13C68-FA4D-4B94-8CFB-6AC71B8630B6}", AZ::Module);
+        AZ_CLASS_ALLOCATOR(MPSGameLiftModuleInterface, AZ::SystemAllocator, 0);
+
+        MPSGameLiftModuleInterface()
+        {
+            m_descriptors.insert(m_descriptors.end(), {
+                MPSGameLiftSystemComponent::CreateDescriptor(),
+                #if AZ_TRAIT_CLIENT
+                    MPSGameLiftClientSystemComponent::CreateDescriptor(),
+                #endif
+                #if AZ_TRAIT_SERVER && !AZ_TRAIT_CLIENT
+                    MPSGameLiftServerSystemComponent::CreateDescriptor(),
+                #endif
+                });
+        }
+
+        /**
+         * Add required SystemComponents to the SystemEntity.
+         */
+        AZ::ComponentTypeList GetRequiredSystemComponents() const override
+        {
+            AZ::ComponentTypeList requiredSystemComponents{
+                azrtti_typeid<MPSGameLiftSystemComponent>()
+            };
+
+            #if AZ_TRAIT_CLIENT
+                requiredSystemComponents.push_back(azrtti_typeid<MPSGameLiftClientSystemComponent>());
+            #endif
+
+            // Only activate the MultiplayerSample GameLift server system component if this a dedicated server running on GameLift.
+            #if (AZ_TRAIT_SERVER && !AZ_TRAIT_CLIENT)
+                if (const auto console = AZ::Interface<AZ::IConsole>::Get())
+                {
+                    bool sv_gameLiftEnabled = false;
+                    if (console->GetCvarValue("sv_gameLiftEnabled", sv_gameLiftEnabled) == AZ::GetValueResult::Success)
+                    {
+                        if (sv_gameLiftEnabled)
+                        {
+                            requiredSystemComponents.push_back(azrtti_typeid<MPSGameLiftServerSystemComponent>());
+                        }
+                    }
+                    else
+                    {
+                        AZ_Assert(false, "MultiplayerSample expecting to access an invalid sv_gameLiftEnabled. Please update code to properly check if GameLift is enabled in order to enable it's custom GameLift server system component.")
+                    }
+                }
+                else
+                {
+                    AZ_Assert(false, "MultiplayerSample expecting to check AZ::Console, but it's not available. Please update code to properly check if this server is running on GameLift.")
+                }
+            #endif
+
+            return requiredSystemComponents;
+        }
+    };
+}// namespace MPSGameLift

+ 19 - 19
Gem/Code/Source/MultiplayerSampleAWSGameLiftServerSystemComponent.cpp → MPSGameLift/Code/Source/MPSGameLiftServerSystemComponent.cpp

@@ -5,7 +5,7 @@
  *
  */
 
-#include "MultiplayerSampleAWSGameLiftServerSystemComponent.h"
+#include "MPSGameLiftServerSystemComponent.h"
 
 #include <AzCore/Console/IConsole.h>
 #include <AzCore/Interface/Interface.h>
@@ -13,39 +13,39 @@
 
 #include <Request/AWSGameLiftServerRequestBus.h>
 
-namespace MultiplayerSample
+namespace MPSGameLift
 {
-    void MultiplayerSampleAWSGameLiftServerSystemComponent::Reflect(AZ::ReflectContext* context)
+    void MPSGameLiftServerSystemComponent::Reflect(AZ::ReflectContext* context)
     {
         if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
         {
-            serialize->Class<MultiplayerSampleAWSGameLiftServerSystemComponent, AZ::Component>()
+            serialize->Class<MPSGameLiftServerSystemComponent, AZ::Component>()
                 ->Version(0)
                 ;
         }
     }
 
-    void MultiplayerSampleAWSGameLiftServerSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
+    void MPSGameLiftServerSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
     {
-        provided.push_back(AZ_CRC_CE("MultiplayerSampleAWSGameLiftServerService"));
+        provided.push_back(AZ_CRC_CE("MPSGameLiftServerService"));
     }
 
-    void MultiplayerSampleAWSGameLiftServerSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
+    void MPSGameLiftServerSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
     {
-        incompatible.push_back(AZ_CRC_CE("MultiplayerSampleAWSGameLiftServerService"));
+        incompatible.push_back(AZ_CRC_CE("MPSGameLiftServerService"));
     }
 
-    void MultiplayerSampleAWSGameLiftServerSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
+    void MPSGameLiftServerSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
     {
         required.push_back(AZ_CRC_CE("MultiplayerService"));
         required.push_back(AZ_CRC_CE("AWSGameLiftServerService"));
     }
 
-    void MultiplayerSampleAWSGameLiftServerSystemComponent::Init()
+    void MPSGameLiftServerSystemComponent::Init()
     {
     }
 
-    void MultiplayerSampleAWSGameLiftServerSystemComponent::Activate()
+    void MPSGameLiftServerSystemComponent::Activate()
     {
         Multiplayer::SessionNotificationBus::Handler::BusConnect();
         AzFramework::LevelLoadBlockerBus::Handler::BusConnect();
@@ -54,26 +54,26 @@ namespace MultiplayerSample
             &AWSGameLift::AWSGameLiftServerRequestBus::Events::NotifyGameLiftProcessReady);
     }
 
-    void MultiplayerSampleAWSGameLiftServerSystemComponent::Deactivate()
+    void MPSGameLiftServerSystemComponent::Deactivate()
     {
         Multiplayer::SessionNotificationBus::Handler::BusDisconnect();
         AzFramework::LevelLoadBlockerBus::Handler::BusDisconnect();
     }
 
-    bool MultiplayerSampleAWSGameLiftServerSystemComponent::OnSessionHealthCheck()
+    bool MPSGameLiftServerSystemComponent::OnSessionHealthCheck()
     {
         // Add here: additional checks against game stats or other conditions, if needed, to determine session health.
         // For now, sufficient to return true so Amazon GameLift knows server process is responsive.
         return true;
     }
 
-    void MultiplayerSampleAWSGameLiftServerSystemComponent::OnCreateSessionEnd()
+    void MPSGameLiftServerSystemComponent::OnCreateSessionEnd()
     {
         AzFramework::LevelLoadBlockerBus::Handler::BusDisconnect();
 
         if (!m_loadedLevelName.empty())
         {
-            AZ_Info("MultiplayerSampleAWSGameLiftServerSystemComponent", "Session requested by Amazon GameLift. Attempting to load level: '%s'", m_loadedLevelName.c_str());
+            AZ_Info("MPSGameLiftServerSystemComponent", "Session requested by Amazon GameLift. Attempting to load level: '%s'", m_loadedLevelName.c_str());
 
             auto loadLevelCommand = AZStd::string::format("LoadLevel %s", m_loadedLevelName.c_str());
             AZ::Interface<AZ::IConsole>::Get()->PerformCommand(loadLevelCommand.c_str());
@@ -81,21 +81,21 @@ namespace MultiplayerSample
         else
         {
             AZ_Info(
-                "MultiplayerSampleAWSGameLiftServerSystemComponent",
+                "MPSGameLiftServerSystemComponent",
                 "Session requested by Amazon GameLift. Make sure to load into a multiplayer level before players join.");
         }
     }
 
-    bool MultiplayerSampleAWSGameLiftServerSystemComponent::ShouldBlockLevelLoading(const char* levelName)
+    bool MPSGameLiftServerSystemComponent::ShouldBlockLevelLoading(const char* levelName)
     {
         m_loadedLevelName = levelName;
         if (levelName)
         {
-            AZ_Info("MultiplayerSampleAWSGameLiftServerSystemComponent", "Interrupted load of level: '%s'", levelName);
+            AZ_Info("MPSGameLiftServerSystemComponent", "Interrupted load of level: '%s'", levelName);
         }
         else
         {
-            AZ_Info("MultiplayerSampleAWSGameLiftServerSystemComponent", "Interrupted level load, but no level provided!");
+            AZ_Info("MPSGameLiftServerSystemComponent", "Interrupted level load, but no level provided!");
         }
         
         return true;

+ 3 - 3
Gem/Code/Source/MultiplayerSampleAWSGameLiftServerSystemComponent.h → MPSGameLift/Code/Source/MPSGameLiftServerSystemComponent.h

@@ -11,15 +11,15 @@
 #include <AzFramework/API/ApplicationAPI.h>
 #include <Multiplayer/Session/SessionNotifications.h>
 
-namespace MultiplayerSample
+namespace MPSGameLift
 {
-    class MultiplayerSampleAWSGameLiftServerSystemComponent
+    class MPSGameLiftServerSystemComponent
         : public AZ::Component
         , public Multiplayer::SessionNotificationBus::Handler
         , public AzFramework::LevelLoadBlockerBus::Handler
     {
     public: 
-        AZ_COMPONENT(MultiplayerSampleAWSGameLiftServerSystemComponent, "{0b0d2c48-058d-4207-b2c5-2778e50ec1c9}");
+        AZ_COMPONENT(MPSGameLiftServerSystemComponent, "{2D3C2443-1F3E-477E-8C26-506E62972E67}");
 
         static void Reflect(AZ::ReflectContext* context);
 

+ 38 - 0
MPSGameLift/Code/Source/Tools/MPSGameLiftEditorModule.cpp

@@ -0,0 +1,38 @@
+
+#include <MPSGameLiftModuleInterface.h>
+#include "MPSGameLiftEditorSystemComponent.h"
+
+namespace MPSGameLift
+{
+    class MPSGameLiftEditorModule
+        : public MPSGameLiftModuleInterface
+    {
+    public:
+        AZ_RTTI(MPSGameLiftEditorModule, "{83F11C38-6C62-49AC-B9AA-3AF337783A80}", MPSGameLiftModuleInterface);
+        AZ_CLASS_ALLOCATOR(MPSGameLiftEditorModule, AZ::SystemAllocator, 0);
+
+        MPSGameLiftEditorModule()
+        {
+            // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
+            // Add ALL components descriptors associated with this gem to m_descriptors.
+            // This will associate the AzTypeInfo information for the components with the the SerializeContext, BehaviorContext and EditContext.
+            // This happens through the [MyComponent]::Reflect() function.
+            m_descriptors.insert(m_descriptors.end(), {
+                MPSGameLiftEditorSystemComponent::CreateDescriptor(),
+            });
+        }
+
+        /**
+         * Add required SystemComponents to the SystemEntity.
+         * Non-SystemComponents should not be added here
+         */
+        AZ::ComponentTypeList GetRequiredSystemComponents() const override
+        {
+            return AZ::ComponentTypeList {
+                azrtti_typeid<MPSGameLiftEditorSystemComponent>(),
+            };
+        }
+    };
+}// namespace MPSGameLift
+
+AZ_DECLARE_MODULE_CLASS(Gem_MPSGameLift, MPSGameLift::MPSGameLiftEditorModule)

+ 54 - 0
MPSGameLift/Code/Source/Tools/MPSGameLiftEditorSystemComponent.cpp

@@ -0,0 +1,54 @@
+
+#include <AzCore/Serialization/SerializeContext.h>
+#include "MPSGameLiftEditorSystemComponent.h"
+
+namespace MPSGameLift
+{
+    void MPSGameLiftEditorSystemComponent::Reflect(AZ::ReflectContext* context)
+    {
+        if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
+        {
+            serializeContext->Class<MPSGameLiftEditorSystemComponent, MPSGameLiftSystemComponent>()
+                ->Version(0);
+        }
+    }
+
+    MPSGameLiftEditorSystemComponent::MPSGameLiftEditorSystemComponent() = default;
+
+    MPSGameLiftEditorSystemComponent::~MPSGameLiftEditorSystemComponent() = default;
+
+    void MPSGameLiftEditorSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
+    {
+        BaseSystemComponent::GetProvidedServices(provided);
+        provided.push_back(AZ_CRC_CE("MPSGameLiftEditorService"));
+    }
+
+    void MPSGameLiftEditorSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
+    {
+        BaseSystemComponent::GetIncompatibleServices(incompatible);
+        incompatible.push_back(AZ_CRC_CE("MPSGameLiftEditorService"));
+    }
+
+    void MPSGameLiftEditorSystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required)
+    {
+        BaseSystemComponent::GetRequiredServices(required);
+    }
+
+    void MPSGameLiftEditorSystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent)
+    {
+        BaseSystemComponent::GetDependentServices(dependent);
+    }
+
+    void MPSGameLiftEditorSystemComponent::Activate()
+    {
+        MPSGameLiftSystemComponent::Activate();
+        AzToolsFramework::EditorEvents::Bus::Handler::BusConnect();
+    }
+
+    void MPSGameLiftEditorSystemComponent::Deactivate()
+    {
+        AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect();
+        MPSGameLiftSystemComponent::Deactivate();
+    }
+
+} // namespace MPSGameLift

+ 33 - 0
MPSGameLift/Code/Source/Tools/MPSGameLiftEditorSystemComponent.h

@@ -0,0 +1,33 @@
+
+#pragma once
+
+#include <AzToolsFramework/API/ToolsApplicationAPI.h>
+
+#include <Unified/MPSGameLiftSystemComponent.h>
+
+namespace MPSGameLift
+{
+    /// System component for MPSGameLift editor
+    class MPSGameLiftEditorSystemComponent
+        : public MPSGameLiftSystemComponent
+        , protected AzToolsFramework::EditorEvents::Bus::Handler
+    {
+        using BaseSystemComponent = MPSGameLiftSystemComponent;
+    public:
+        AZ_COMPONENT(MPSGameLiftEditorSystemComponent, "{9B966497-AE1C-4942-88A4-55726C728DA6}", BaseSystemComponent);
+        static void Reflect(AZ::ReflectContext* context);
+
+        MPSGameLiftEditorSystemComponent();
+        ~MPSGameLiftEditorSystemComponent();
+
+    private:
+        static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
+        static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
+        static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
+        static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
+
+        // AZ::Component
+        void Activate() override;
+        void Deactivate() override;
+    };
+} // namespace MPSGameLift

+ 21 - 0
MPSGameLift/Code/Source/Unified/MPSGameLiftModule.cpp

@@ -0,0 +1,21 @@
+
+
+#include <MPSGameLiftModuleInterface.h>
+#include "MPSGameLiftSystemComponent.h"
+
+namespace MPSGameLift
+{
+    class MPSGameLiftModule
+        : public MPSGameLiftModuleInterface
+    {
+    public:
+        AZ_RTTI(MPSGameLiftModule, "{83F11C38-6C62-49AC-B9AA-3AF337783A80}", MPSGameLiftModuleInterface);
+        AZ_CLASS_ALLOCATOR(MPSGameLiftModule, AZ::SystemAllocator, 0);
+    };
+}// namespace MPSGameLift
+
+#if defined(AZ_MONOLITHIC_BUILD)
+AZ_DECLARE_MODULE_CLASS(Gem_MPSGameLift_Client, MPSGameLift::MPSGameLiftModule);
+AZ_DECLARE_MODULE_CLASS(Gem_MPSGameLift_Server, MPSGameLift::MPSGameLiftModule);
+#endif
+AZ_DECLARE_MODULE_CLASS(Gem_MPSGameLift, MPSGameLift::MPSGameLiftModule)

+ 76 - 0
MPSGameLift/Code/Source/Unified/MPSGameLiftSystemComponent.cpp

@@ -0,0 +1,76 @@
+
+#include "MPSGameLiftSystemComponent.h"
+
+#include <AzCore/Serialization/SerializeContext.h>
+#include <AzCore/Serialization/EditContext.h>
+#include <AzCore/Serialization/EditContextConstants.inl>
+
+namespace MPSGameLift
+{
+    void MPSGameLiftSystemComponent::Reflect(AZ::ReflectContext* context)
+    {
+        if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
+        {
+            serialize->Class<MPSGameLiftSystemComponent, AZ::Component>()
+                ->Version(0)
+                ;
+
+            if (AZ::EditContext* ec = serialize->GetEditContext())
+            {
+                ec->Class<MPSGameLiftSystemComponent>("MPSGameLift", "[Description of functionality provided by this System Component]")
+                    ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
+                        ->Attribute(AZ::Edit::Attributes::AutoExpand, true)
+                    ;
+            }
+        }
+    }
+
+    void MPSGameLiftSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
+    {
+        provided.push_back(AZ_CRC_CE("MPSGameLiftService"));
+    }
+
+    void MPSGameLiftSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
+    {
+        incompatible.push_back(AZ_CRC_CE("MPSGameLiftService"));
+    }
+
+    void MPSGameLiftSystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required)
+    {
+    }
+
+    void MPSGameLiftSystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent)
+    {
+    }
+
+    MPSGameLiftSystemComponent::MPSGameLiftSystemComponent()
+    {
+        if (MPSGameLiftInterface::Get() == nullptr)
+        {
+            MPSGameLiftInterface::Register(this);
+        }
+    }
+
+    MPSGameLiftSystemComponent::~MPSGameLiftSystemComponent()
+    {
+        if (MPSGameLiftInterface::Get() == this)
+        {
+            MPSGameLiftInterface::Unregister(this);
+        }
+    }
+
+    void MPSGameLiftSystemComponent::Init()
+    {
+    }
+
+    void MPSGameLiftSystemComponent::Activate()
+    {
+        MPSGameLiftRequestBus::Handler::BusConnect();
+    }
+
+    void MPSGameLiftSystemComponent::Deactivate()
+    {
+        MPSGameLiftRequestBus::Handler::BusDisconnect();
+    }
+
+} // namespace MPSGameLift

+ 41 - 0
MPSGameLift/Code/Source/Unified/MPSGameLiftSystemComponent.h

@@ -0,0 +1,41 @@
+
+#pragma once
+
+#include <AzCore/Component/Component.h>
+#include <AzCore/Component/TickBus.h>
+#include <MPSGameLift/MPSGameLiftBus.h>
+
+namespace MPSGameLift
+{
+    class MPSGameLiftSystemComponent
+        : public AZ::Component
+        , protected MPSGameLiftRequestBus::Handler
+    {
+    public:
+        AZ_COMPONENT(MPSGameLiftSystemComponent, "{FEDB720B-2B15-423D-8596-41E9E3FBBC3B}");
+
+        static void Reflect(AZ::ReflectContext* context);
+
+        static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
+        static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
+        static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
+        static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
+
+        MPSGameLiftSystemComponent();
+        ~MPSGameLiftSystemComponent();
+
+    protected:
+        ////////////////////////////////////////////////////////////////////////
+        // MPSGameLiftRequestBus interface implementation
+
+        ////////////////////////////////////////////////////////////////////////
+
+        ////////////////////////////////////////////////////////////////////////
+        // AZ::Component interface implementation
+        void Init() override;
+        void Activate() override;
+        void Deactivate() override;
+        ////////////////////////////////////////////////////////////////////////
+    };
+
+} // namespace MPSGameLift

+ 4 - 0
MPSGameLift/Code/Tests/Tools/MPSGameLiftEditorTest.cpp

@@ -0,0 +1,4 @@
+
+#include <AzTest/AzTest.h>
+
+AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV);

+ 4 - 0
MPSGameLift/Code/Tests/Unified/MPSGameLiftTest.cpp

@@ -0,0 +1,4 @@
+
+#include <AzTest/AzTest.h>
+
+AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV);

+ 4 - 0
MPSGameLift/Code/mpsgamelift_api_files.cmake

@@ -0,0 +1,4 @@
+
+set(FILES
+    Include/MPSGameLift/MPSGameLiftBus.h
+)

+ 11 - 0
MPSGameLift/Code/mpsgamelift_client_files.cmake

@@ -0,0 +1,11 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project
+#
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+set(FILES
+    Source/MPSGameLiftClientSystemComponent.cpp
+    Source/MPSGameLiftClientSystemComponent.h
+)

+ 4 - 0
MPSGameLift/Code/mpsgamelift_editor_api_files.cmake

@@ -0,0 +1,4 @@
+
+
+set(FILES
+)

+ 5 - 0
MPSGameLift/Code/mpsgamelift_editor_private_files.cmake

@@ -0,0 +1,5 @@
+
+set(FILES
+    Source/Tools/MPSGameLiftEditorSystemComponent.cpp
+    Source/Tools/MPSGameLiftEditorSystemComponent.h
+)

+ 4 - 0
MPSGameLift/Code/mpsgamelift_editor_shared_files.cmake

@@ -0,0 +1,4 @@
+
+set(FILES
+    Source/Tools/MPSGameLiftEditorModule.cpp
+)

+ 4 - 0
MPSGameLift/Code/mpsgamelift_editor_tests_files.cmake

@@ -0,0 +1,4 @@
+
+set(FILES
+    Tests/Tools/MPSGameLiftEditorTest.cpp
+)

+ 6 - 0
MPSGameLift/Code/mpsgamelift_private_files.cmake

@@ -0,0 +1,6 @@
+
+set(FILES
+    Source/MPSGameLiftModuleInterface.h
+    Source/Unified/MPSGameLiftSystemComponent.cpp
+    Source/Unified/MPSGameLiftSystemComponent.h
+)

+ 11 - 0
MPSGameLift/Code/mpsgamelift_server_files.cmake

@@ -0,0 +1,11 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project
+#
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+set(FILES
+    Source/MPSGameLiftServerSystemComponent.cpp
+    Source/MPSGameLiftServerSystemComponent.h
+)

+ 4 - 0
MPSGameLift/Code/mpsgamelift_shared_files.cmake

@@ -0,0 +1,4 @@
+
+set(FILES
+    Source/Unified/MPSGameLiftModule.cpp
+)

+ 4 - 0
MPSGameLift/Code/mpsgamelift_tests_files.cmake

@@ -0,0 +1,4 @@
+
+set(FILES
+    Tests/Unified/MPSGameLiftTest.cpp
+)

+ 18 - 0
MPSGameLift/Registry/assetprocessor_settings.setreg

@@ -0,0 +1,18 @@
+{
+    "Amazon": {
+        "AssetProcessor": {
+            "Settings": {
+                "ScanFolder MPSGameLift/Assets": {
+                    "watch": "@GEMROOT:MPSGameLift@/Assets",
+                    "recursive": 1,
+                    "order": 101
+                },
+                "ScanFolder MPSGameLift/Registry": {
+                    "watch": "@GEMROOT:MPSGameLift@/Registry",
+                    "recursive": 1,
+                    "order": 102
+                }
+            }
+        }
+    }
+}

+ 25 - 0
MPSGameLift/gem.json

@@ -0,0 +1,25 @@
+{
+    "gem_name": "MPSGameLift",
+    "display_name": "MPSGameLift",
+    "license": "License used i.e. Apache-2.0 or MIT",
+    "license_url": "Link to the license web site i.e. https://opensource.org/licenses/Apache-2.0",
+    "origin": "The name of the originator or creator",
+    "origin_url": "The website for this Gem",
+    "type": "Code",
+    "summary": "Enable this gem for MultiplayerSample in order to enable AWS GameLift integration. See README_GAMELIFT.md.",
+    "canonical_tags": [
+        "Gem"
+    ],
+    "user_tags": [
+        "MPSGameLift"
+    ],
+    "platforms": [
+        ""
+    ],
+    "icon_path": "preview.png",
+    "requirements": "",
+    "documentation_url": "Link to any documentation of your Gem",
+    "dependencies": ["AWSGameLift"],
+    "repo_uri": "",
+    "restricted": "MPSGameLift"
+}

+ 3 - 0
MPSGameLift/preview.png

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:248e3ffe1fc9ffc02afb2ba8914e222a5a5d13ac45a48b98c95ee062e959a94c
+size 4475

+ 2 - 1
README_GAMELIFT.md

@@ -8,6 +8,7 @@ This README covers testing and running MultiplayerSample with Amazon GameLift.
 
 1. Install the [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html), if you don't already have it. You will need it to create a game session with GameLiftLocal.
 1. Download the [AmazonGameLift Server SDK](https://gamelift-release.s3-us-west-2.amazonaws.com/GameLift_06_03_2021.zip) and extract the "GameLiftLocal-1.0.5" directory somewhere easy to find.
+1. Enable the "AWSGameLift" and "MPSGameLift" gem by adding them to MultiplayerSample/Gem/Code/enabled_gems.cmake
 1. Build the server and game launchers for MultiplayerSample as normal, per [top-level README](/README.md).
 
 
@@ -33,5 +34,5 @@ Note: You may be inclined to move these cvars into a cfg file and start the game
 
 4. Finally, start the game launcher with the follow command:
     ```sh
-    ./build/windows/bin/profile/MultiplayerSample.GameLauncher.exe --MultiplayerSampleAWSGameLiftClientSystemComponent.JoinSession hello-mps --cl_gameliftLocalEndpoint "http://localhost:8080"
+    ./build/windows/bin/profile/MultiplayerSample.GameLauncher.exe --MPSGameLiftClientSystemComponent.JoinSession hello-mps --cl_gameliftLocalEndpoint "http://localhost:8080"
     ```

+ 1 - 0
project.json

@@ -14,6 +14,7 @@
     "icon_path": "preview.png",
     "engine": "o3de",
     "external_subdirectories": [
+        "MPSGameLift",
         "Gem"
     ],
     "gem_names": [