diff --git a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main.py
index 4a0409b0c7..b4de39ae98 100644
--- a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main.py
+++ b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main.py
@@ -61,6 +61,10 @@ class TestAutomation(EditorTestSuite):
class AtomEditorComponents_HDRColorGradingAdded(EditorSharedTest):
from Atom.tests import hydra_AtomEditorComponents_HDRColorGradingAdded as test_module
+ @pytest.mark.test_case_id("C32078116")
+ class AtomEditorComponents_HDRiSkyboxAdded(EditorSharedTest):
+ from Atom.tests import hydra_AtomEditorComponents_HDRiSkyboxAdded as test_module
+
@pytest.mark.test_case_id("C32078117")
class AtomEditorComponents_LightAdded(EditorSharedTest):
from Atom.tests import hydra_AtomEditorComponents_LightAdded as test_module
diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_HDRiSkyboxAdded.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_HDRiSkyboxAdded.py
new file mode 100644
index 0000000000..0f96bc5424
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_HDRiSkyboxAdded.py
@@ -0,0 +1,177 @@
+"""
+Copyright (c) Contributors to the Open 3D Engine Project.
+For complete copyright and license terms please see the LICENSE at the root of this distribution.
+
+SPDX-License-Identifier: Apache-2.0 OR MIT
+"""
+
+
+class Tests:
+ creation_undo = (
+ "UNDO Entity creation success",
+ "UNDO Entity creation failed")
+ creation_redo = (
+ "REDO Entity creation success",
+ "REDO Entity creation failed")
+ hdri_skybox_entity_creation = (
+ "HDRi Skybox successfully created",
+ "HDRi Skybox failed to be created")
+ hdri_skybox_component = (
+ "Entity has an HDRi Skybox component",
+ "Entity failed to find HDRi Skybox component")
+ cubemap_property_set = (
+ "Cubemap property set on HDRi Skybox component",
+ "Couldn't set Cubemap property on HDRi Skybox component")
+ enter_game_mode = (
+ "Entered game mode",
+ "Failed to enter game mode")
+ exit_game_mode = (
+ "Exited game mode",
+ "Couldn't exit game mode")
+ is_visible = (
+ "Entity is visible",
+ "Entity was not visible")
+ is_hidden = (
+ "Entity is hidden",
+ "Entity was not hidden")
+ entity_deleted = (
+ "Entity deleted",
+ "Entity was not deleted")
+ deletion_undo = (
+ "UNDO deletion success",
+ "UNDO deletion failed")
+ deletion_redo = (
+ "REDO deletion success",
+ "REDO deletion failed")
+
+
+def AtomEditorComponents_HDRiSkybox_AddedToEntity():
+ """
+ Summary:
+ Tests the HDRi Skybox component can be added to an entity and has the expected functionality.
+
+ Test setup:
+ - Wait for Editor idle loop.
+ - Open the "Base" level.
+
+ Expected Behavior:
+ The component can be added, used in game mode, hidden/shown, deleted, and has accurate required components.
+ Creation and deletion undo/redo should also work.
+
+ Test Steps:
+ 1) Create an HDRi Skybox with no components.
+ 2) Add an HDRi Skybox component to HDRi Skybox.
+ 3) UNDO the entity creation and component addition.
+ 4) REDO the entity creation and component addition.
+ 5) Enter/Exit game mode.
+ 6) Test IsHidden.
+ 7) Test IsVisible.
+ 8) Delete HDRi Skybox.
+ 9) UNDO deletion.
+ 10) REDO deletion.
+ 11) Look for errors.
+
+ :return: None
+ """
+
+ import os
+
+ import azlmbr.legacy.general as general
+
+ from editor_python_test_tools.asset_utils import Asset
+ from editor_python_test_tools.editor_entity_utils import EditorEntity
+ from editor_python_test_tools.utils import Report, Tracer, TestHelper
+ from Atom.atom_utils.atom_constants import AtomComponentProperties
+
+ with Tracer() as error_tracer:
+ # Test setup begins.
+ # Setup: Wait for Editor idle loop before executing Python hydra scripts then open "Base" level.
+ TestHelper.init_idle()
+ TestHelper.open_level("", "Base")
+
+ # Test steps begin.
+ # 1. Create an HDRi Skybox with no components.
+ hdri_skybox_entity = EditorEntity.create_editor_entity(
+ AtomComponentProperties.hdri_skybox())
+ Report.critical_result(Tests.hdri_skybox_entity_creation,
+ hdri_skybox_entity.exists())
+
+ # 2. Add an HDRi Skybox component to HDRi Skybox.
+ hdri_skybox_component = hdri_skybox_entity.add_component(
+ AtomComponentProperties.hdri_skybox())
+ Report.critical_result(
+ Tests.hdri_skybox_component,
+ hdri_skybox_entity.has_component(AtomComponentProperties.hdri_skybox()))
+
+ # 3. UNDO the entity creation and component addition.
+ # -> UNDO component addition.
+ general.undo()
+ # -> UNDO naming entity.
+ general.undo()
+ # -> UNDO selecting entity.
+ general.undo()
+ # -> UNDO entity creation.
+ general.undo()
+ general.idle_wait_frames(1)
+ Report.result(Tests.creation_undo, not hdri_skybox_entity.exists())
+
+ # 4. REDO the entity creation and component addition.
+ # -> REDO entity creation.
+ general.redo()
+ # -> REDO selecting entity.
+ general.redo()
+ # -> REDO naming entity.
+ general.redo()
+ # -> REDO component addition.
+ general.redo()
+ general.idle_wait_frames(1)
+ Report.result(Tests.creation_redo, hdri_skybox_entity.exists())
+
+
+ # 5. Set Cubemap Texture on HDRi Skybox component.
+ skybox_cubemap_asset_path = os.path.join("LightingPresets", "default_iblskyboxcm.exr.streamingimage")
+ skybox_cubemap_material_asset = Asset.find_asset_by_path(skybox_cubemap_asset_path, False)
+ hdri_skybox_component.set_component_property_value(
+ AtomComponentProperties.hdri_skybox('Cubemap Texture'), skybox_cubemap_material_asset.id)
+ get_cubemap_property = hdri_skybox_component.get_component_property_value(
+ AtomComponentProperties.hdri_skybox('Cubemap Texture'))
+ Report.result(Tests.cubemap_property_set, get_cubemap_property == skybox_cubemap_material_asset.id)
+
+
+ # 6. Enter/Exit game mode.
+ TestHelper.enter_game_mode(Tests.enter_game_mode)
+ general.idle_wait_frames(1)
+ TestHelper.exit_game_mode(Tests.exit_game_mode)
+
+ # 7. Test IsHidden.
+ hdri_skybox_entity.set_visibility_state(False)
+ Report.result(Tests.is_hidden, hdri_skybox_entity.is_hidden() is True)
+
+ # 8. Test IsVisible.
+ hdri_skybox_entity.set_visibility_state(True)
+ general.idle_wait_frames(1)
+ Report.result(Tests.is_visible, hdri_skybox_entity.is_visible() is True)
+
+ # 9. Delete hdri_skybox entity.
+ hdri_skybox_entity.delete()
+ Report.result(Tests.entity_deleted, not hdri_skybox_entity.exists())
+
+ # 10. UNDO deletion.
+ general.undo()
+ Report.result(Tests.deletion_undo, hdri_skybox_entity.exists())
+
+ # 11. REDO deletion.
+ general.redo()
+ Report.result(Tests.deletion_redo, not hdri_skybox_entity.exists())
+
+ # 12. Look for errors or asserts.
+ TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0)
+ for error_info in error_tracer.errors:
+ Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}")
+ for assert_info in error_tracer.asserts:
+ Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}")
+
+
+if __name__ == "__main__":
+ from editor_python_test_tools.utils import Report
+ Report.start_test(AtomEditorComponents_HDRiSkybox_AddedToEntity)
diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/editor_entity_utils.py b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/editor_entity_utils.py
index 9e857ed8bc..59e454479c 100644
--- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/editor_entity_utils.py
+++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/editor_entity_utils.py
@@ -132,6 +132,7 @@ class EditorEntity:
def __init__(self, id: azlmbr.entity.EntityId):
self.id: azlmbr.entity.EntityId = id
+ self.components: List[EditorComponent] = []
# Creation functions
@classmethod
@@ -279,7 +280,7 @@ class EditorEntity:
), f"Failure: Could not add component: '{new_comp.get_component_name()}' to entity: '{self.get_name()}'"
new_comp.id = add_component_outcome.GetValue()[0]
components.append(new_comp)
-
+ self.components.append(new_comp)
return components
def get_components_of_type(self, component_names: list) -> List[EditorComponent]:
diff --git a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main_Optimized.py b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main_Optimized.py
index 3d668a2085..0661c6742b 100644
--- a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main_Optimized.py
+++ b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main_Optimized.py
@@ -60,7 +60,7 @@ class EditorSingleTest_WithFileOverrides(EditorSingleTest):
class TestAutomationWithPrefabSystemEnabled(EditorTestSuite):
global_extra_cmdline_args = ['-BatchMode', '-autotest_mode',
- 'extra_cmdline_args=["--regset=/Amazon/Preferences/EnablePrefabSystem=true"]']
+ '--regset=/Amazon/Preferences/EnablePrefabSystem=true']
@staticmethod
def get_number_parallel_editors():
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt
index c2123d683c..98801b49d6 100644
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt
@@ -24,7 +24,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
LargeWorlds
)
-
ly_add_pytest(
NAME AutomatedTesting::DynamicVegetationTests_Periodic
TEST_SERIAL
@@ -39,6 +38,20 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
LargeWorlds
)
+ ly_add_pytest(
+ NAME AutomatedTesting::DynamicVegetationTests_Periodic_Optimized
+ TEST_SERIAL
+ TEST_SUITE periodic
+ PATH ${CMAKE_CURRENT_LIST_DIR}/dyn_veg/TestSuite_Periodic_Optimized.py
+ RUNTIME_DEPENDENCIES
+ AZ::AssetProcessor
+ Legacy::Editor
+ AutomatedTesting.Assets
+ AutomatedTesting.GameLauncher
+ COMPONENT
+ LargeWorlds
+ )
+
ly_add_pytest(
NAME AutomatedTesting::DynamicVegetationTests_Main_Optimized
TEST_SERIAL
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynVegUtils_TempPrefabCreationWorks.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynVegUtils_TempPrefabCreationWorks.py
new file mode 100644
index 0000000000..d016473d5e
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynVegUtils_TempPrefabCreationWorks.py
@@ -0,0 +1,85 @@
+"""
+Copyright (c) Contributors to the Open 3D Engine Project.
+For complete copyright and license terms please see the LICENSE at the root of this distribution.
+
+SPDX-License-Identifier: Apache-2.0 OR MIT
+"""
+
+
+def DynVegUtils_TempPrefabCreationWorks():
+ """
+ Summary:
+ An existing level is opened. Each Prefab setup to be spawned by Dynamic Vegetation tests is created in memory and
+ validated against existing test slice components/mesh assignments.
+
+ Expected Behavior:
+ Temporary prefabs contain the expected components/assets.
+
+ Test Steps:
+ 1) Open an existing level
+ 2) Create each of the necessary temporary Mesh prefabs, and validate the component/mesh setups
+ 3) Create the necessary temporary PhysX Collider, and validate the component setup
+ 4) Report errors/asserts
+
+ :return: None
+ """
+
+ import os
+
+ import azlmbr.asset as asset
+ import azlmbr.bus as bus
+ import azlmbr.math as math
+
+ from Prefab.tests import PrefabTestUtils as prefab_test_utils
+ from largeworlds.large_worlds_utils import editor_dynveg_test_helper as dynveg
+ from editor_python_test_tools.utils import Report, Tracer
+ from editor_python_test_tools.utils import TestHelper as helper
+ from editor_python_test_tools.prefab_utils import PrefabInstance
+
+ with Tracer() as error_tracer:
+ # Create dictionary for prefab filenames and paths to create using helper function
+ mesh_prefabs = {
+ "PinkFlower": os.path.join("assets", "objects", "foliage", "grass_flower_pink.azmodel"),
+ "PurpleFlower": os.path.join("assets", "objects", "foliage", "grass_flower_purple.azmodel"),
+ "1m_Cube": os.path.join("objects", "_primitives", "_box_1x1.azmodel"),
+ "CedarTree": os.path.join("assets", "objects", "foliage", "cedar.azmodel"),
+ "Bush": os.path.join("assets", "objects", "foliage", "bush_privet_01.azmodel"),
+ }
+
+ # 1) Open an existing simple level
+ prefab_test_utils.open_base_tests_level()
+
+ # 2) Create each of the Mesh asset prefabs and validate that the prefab created successfully
+ for prefab_filename, asset_path in mesh_prefabs.items():
+ mesh_prefab_created = (
+ f"Temporary mesh prefab: {prefab_filename} created successfully",
+ f"Failed to create temporary mesh prefab: {prefab_filename}"
+ )
+ prefab = dynveg.create_temp_mesh_prefab(asset_path, prefab_filename)
+ Report.result(mesh_prefab_created, helper.wait_for_condition(lambda:
+ PrefabInstance.is_valid(prefab[1]), 3.0))
+
+ # 3) Create temp PhysX Collider prefab and validate that the prefab created successfully
+ physx_prefab_filename = "CedarTree_Collision"
+ physx_collider_prefab_created = (
+ f"Temporary mesh prefab: {physx_prefab_filename} created successfully",
+ f"Failed to create temporary mesh prefab: {physx_prefab_filename}"
+ )
+ test_physx_mesh_asset_id = asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", os.path.join(
+ "assets", "objects", "foliage", "cedar.pxmesh"), math.Uuid(), False)
+ dynveg.create_temp_physx_mesh_collider(test_physx_mesh_asset_id, physx_prefab_filename)
+ Report.result(physx_collider_prefab_created, helper.wait_for_condition(lambda:
+ PrefabInstance.is_valid(prefab[1]), 3.0))
+
+ # 4) Report errors/asserts
+ helper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0)
+ for error_info in error_tracer.errors:
+ Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}")
+ for assert_info in error_tracer.asserts:
+ Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}")
+
+
+if __name__ == "__main__":
+
+ from editor_python_test_tools.utils import Report
+ Report.start_test(DynVegUtils_TempPrefabCreationWorks)
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic_Optimized.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic_Optimized.py
new file mode 100644
index 0000000000..8d298e970b
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic_Optimized.py
@@ -0,0 +1,23 @@
+"""
+Copyright (c) Contributors to the Open 3D Engine Project.
+For complete copyright and license terms please see the LICENSE at the root of this distribution.
+
+SPDX-License-Identifier: Apache-2.0 OR MIT
+"""
+
+import os
+import pytest
+
+import ly_test_tools.environment.file_system as file_system
+from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, EditorParallelTest, EditorTestSuite
+
+
+@pytest.mark.SUITE_main
+@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
+@pytest.mark.parametrize("project", ["AutomatedTesting"])
+class TestAutomation(EditorTestSuite):
+
+ global_extra_cmdline_args = ["-BatchMode", "-autotest_mode", "--regset=/Amazon/Preferences/EnablePrefabSystem=true"]
+
+ class test_DynVegUtils_TempPrefabCreationWorks(EditorSharedTest):
+ from .EditorScripts import DynVegUtils_TempPrefabCreationWorks as test_module
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/large_worlds_utils/editor_dynveg_test_helper.py b/AutomatedTesting/Gem/PythonTests/largeworlds/large_worlds_utils/editor_dynveg_test_helper.py
index 957536fffb..d7d5842518 100755
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/large_worlds_utils/editor_dynveg_test_helper.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/large_worlds_utils/editor_dynveg_test_helper.py
@@ -19,6 +19,45 @@ import azlmbr.paths
sys.path.append(os.path.join(azlmbr.paths.projectroot, 'Gem', 'PythonTests'))
import editor_python_test_tools.hydra_editor_utils as hydra
+from editor_python_test_tools.editor_entity_utils import EditorEntity
+from editor_python_test_tools.prefab_utils import Prefab
+
+
+def create_temp_mesh_prefab(mesh_asset_path, prefab_filename):
+ # Create initial entity
+ root = EditorEntity.create_editor_entity(name=prefab_filename)
+ assert root.exists(), "Failed to create entity"
+ # Add mesh component
+ mesh_component = root.add_component("Mesh")
+ assert root.has_component("Mesh") and mesh_component.is_enabled(), "Failed to add/activate Mesh component"
+ # Assign the specified mesh asset
+ mesh_asset = asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", mesh_asset_path, math.Uuid(), False)
+ mesh_component.set_component_property_value("Controller|Configuration|Mesh Asset", mesh_asset)
+ assert mesh_component.get_component_property_value("Controller|Configuration|Mesh Asset") == mesh_asset, \
+ "Failed to set Mesh asset"
+ # Create and return the temporary/in-memory prefab
+ temp_prefab = Prefab.create_prefab([root], prefab_filename)
+ return temp_prefab
+
+
+def create_temp_physx_mesh_collider(physx_mesh_id, prefab_filename):
+ # Create initial entity
+ root = EditorEntity.create_editor_entity(name=prefab_filename)
+ assert root.exists(), "Failed to create entity"
+ # Add PhysX Collider component
+ collider_component = root.add_component("PhysX Collider")
+ assert root.has_component("PhysX Collider") and collider_component.is_enabled(), \
+ "Failed to add/activate PhysX Collider component"
+ # Set the Collider's Shape Configuration field to PhysicsAsset, and assign the specified PhysX Mesh asset
+ collider_component.set_component_property_value("Shape Configuration|Shape", 7)
+ assert collider_component.get_component_property_value("Shape Configuration|Shape") == 7, \
+ "Failed to set Collider Shape to PhysicsAsset"
+ collider_component.set_component_property_value("Shape Configuration|Asset|PhysX Mesh", physx_mesh_id)
+ assert collider_component.get_component_property_value("Shape Configuration|Asset|PhysX Mesh") == physx_mesh_id, \
+ "Failed to assign PhysX Mesh asset"
+ # Create and return the temporary/in-memory prefab
+ temp_prefab = Prefab.create_prefab([root], prefab_filename)
+ return temp_prefab
def create_surface_entity(name, center_point, box_size_x, box_size_y, box_size_z):
diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_SerializeContextTools_Works.py b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_SerializeContextTools_Works.py
index a3f6b8b09f..917ff17f82 100644
--- a/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_SerializeContextTools_Works.py
+++ b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_SerializeContextTools_Works.py
@@ -13,7 +13,10 @@ import os
import pytest
import subprocess
+import ly_test_tools
+
+@pytest.mark.skipif(not ly_test_tools.WINDOWS, reason="Only succeeds on windows https://github.com/o3de/o3de/issues/5539")
@pytest.mark.SUITE_smoke
class TestCLIToolSerializeContextToolsWorks(object):
def test_CLITool_SerializeContextTools_Works(self, build_directory):
diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_Editor_NewExistingLevels_Works.py b/AutomatedTesting/Gem/PythonTests/smoke/test_Editor_NewExistingLevels_Works.py
index 72e548615c..ebaebcfa92 100644
--- a/AutomatedTesting/Gem/PythonTests/smoke/test_Editor_NewExistingLevels_Works.py
+++ b/AutomatedTesting/Gem/PythonTests/smoke/test_Editor_NewExistingLevels_Works.py
@@ -11,10 +11,13 @@ Test should run in both gpu and non gpu
import pytest
import os
from automatedtesting_shared.base import TestAutomationBase
+
+import ly_test_tools
import ly_test_tools.environment.file_system as file_system
@pytest.mark.SUITE_smoke
+@pytest.mark.skipif(not ly_test_tools.WINDOWS, reason="Only succeeds on windows https://github.com/o3de/o3de/issues/5539")
@pytest.mark.parametrize("launcher_platform", ["windows_editor"])
@pytest.mark.parametrize("project", ["AutomatedTesting"])
@pytest.mark.parametrize("level", ["temp_level"])
diff --git a/Code/Editor/AboutDialog.ui b/Code/Editor/AboutDialog.ui
index a6c5bb5d52..09a7c18841 100644
--- a/Code/Editor/AboutDialog.ui
+++ b/Code/Editor/AboutDialog.ui
@@ -125,7 +125,7 @@
- General Availability
+ development
Qt::AutoText
diff --git a/Code/Editor/StartupLogoDialog.ui b/Code/Editor/StartupLogoDialog.ui
index c0b8115cb0..cbc596f53a 100644
--- a/Code/Editor/StartupLogoDialog.ui
+++ b/Code/Editor/StartupLogoDialog.ui
@@ -103,7 +103,7 @@
-
- General Availability
+ development
diff --git a/Code/Legacy/CrySystem/SystemInit.cpp b/Code/Legacy/CrySystem/SystemInit.cpp
index 8a0586fb13..5cb60f2cdf 100644
--- a/Code/Legacy/CrySystem/SystemInit.cpp
+++ b/Code/Legacy/CrySystem/SystemInit.cpp
@@ -1225,20 +1225,6 @@ static AZStd::string ConcatPath(const char* szPart1, const char* szPart2)
return ret;
}
-// Helper to maintain backwards compatibility with our CVar but not force our new code to
-// pull in CryCommon by routing through an environment variable
-void CmdSetAwsLogLevel(IConsoleCmdArgs* pArgs)
-{
- static const char* const logLevelEnvVar = "sys_SetLogLevel";
- static AZ::EnvironmentVariable logVar = AZ::Environment::CreateVariable(logLevelEnvVar);
- if (pArgs->GetArgCount() > 1)
- {
- int logLevel = atoi(pArgs->GetArg(1));
- *logVar = logLevel;
- AZ_TracePrintf("AWSLogging", "Log level set to %d", *logVar);
- }
-}
-
//////////////////////////////////////////////////////////////////////////
void CSystem::CreateSystemVars()
{
@@ -1601,8 +1587,6 @@ void CSystem::CreateSystemVars()
// Since the UI Canvas Editor is incomplete, we have a variable to enable it.
// By default it is now enabled. Modify system.cfg or game.cfg to disable it
REGISTER_INT("sys_enableCanvasEditor", 1, VF_NULL, "Enables the UI Canvas Editor");
-
- REGISTER_COMMAND("sys_SetLogLevel", CmdSetAwsLogLevel, 0, "Set AWS log level [0 - 6].");
}
//////////////////////////////////////////////////////////////////////////
diff --git a/Code/Tools/AWSNativeSDKInit/CMakeLists.txt b/Code/Tools/AWSNativeSDKInit/CMakeLists.txt
index d571f0d9e3..57ee31d30d 100644
--- a/Code/Tools/AWSNativeSDKInit/CMakeLists.txt
+++ b/Code/Tools/AWSNativeSDKInit/CMakeLists.txt
@@ -24,3 +24,30 @@ ly_add_target(
3rdParty::AWSNativeSDK::Core
AZ::AzCore
)
+
+################################################################################
+# Tests
+################################################################################
+if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
+ ly_add_target(
+ NAME AWSNativeSDKInit.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
+ NAMESPACE AZ
+ FILES_CMAKE
+ aws_native_sdk_init_tests_files.cmake
+ INCLUDE_DIRECTORIES
+ PRIVATE
+ include
+ tests
+ source
+ BUILD_DEPENDENCIES
+ PRIVATE
+ AZ::AzCore
+ AZ::AzFramework
+ AZ::AzTest
+ AZ::AWSNativeSDKInit
+ 3rdParty::AWSNativeSDK::Core
+ )
+ ly_add_googletest(
+ NAME AZ::AWSNativeSDKInit.Tests
+ )
+endif()
diff --git a/Code/Tools/AWSNativeSDKInit/aws_native_sdk_init_tests_files.cmake b/Code/Tools/AWSNativeSDKInit/aws_native_sdk_init_tests_files.cmake
new file mode 100644
index 0000000000..9029a1198a
--- /dev/null
+++ b/Code/Tools/AWSNativeSDKInit/aws_native_sdk_init_tests_files.cmake
@@ -0,0 +1,12 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+#
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+set(FILES
+ tests/AWSLogSystemInterfaceTest.cpp
+ tests/AWSNativeSDKInitTest.cpp
+)
diff --git a/Code/Tools/AWSNativeSDKInit/source/AWSLogSystemInterface.cpp b/Code/Tools/AWSNativeSDKInit/source/AWSLogSystemInterface.cpp
index 113e513743..0ccfc43ba4 100644
--- a/Code/Tools/AWSNativeSDKInit/source/AWSLogSystemInterface.cpp
+++ b/Code/Tools/AWSNativeSDKInit/source/AWSLogSystemInterface.cpp
@@ -10,6 +10,8 @@
#include
#include
+#include
+#include
#include
#include
@@ -24,6 +26,9 @@ AZ_POP_DISABLE_WARNING
namespace AWSNativeSDKInit
{
+ AZ_CVAR(int, bg_awsLogLevel, -1, nullptr, AZ::ConsoleFunctorFlags::Null,
+ "AWSLogLevel used to control verbosity of logging system. Off = 0, Fatal = 1, Error = 2, Warn = 3, Info = 4, Debug = 5, Trace = 6");
+
const char* AWSLogSystemInterface::AWS_API_LOG_PREFIX = "AwsApi-";
const int AWSLogSystemInterface::MAX_MESSAGE_LENGTH = 4096;
const char* AWSLogSystemInterface::MESSAGE_FORMAT = "[AWS] %s - %s";
@@ -40,15 +45,16 @@ namespace AWSNativeSDKInit
Aws::Utils::Logging::LogLevel AWSLogSystemInterface::GetLogLevel() const
{
Aws::Utils::Logging::LogLevel newLevel = m_logLevel;
- static const char* const logLevelEnvVar = "sys_SetLogLevel";
- auto logVar = AZ::Environment::FindVariable(logLevelEnvVar);
-
- if (logVar)
+ if (auto console = AZ::Interface::Get(); console != nullptr)
{
- newLevel = (Aws::Utils::Logging::LogLevel) *logVar;
+ int awsLogLevel = -1;
+ console->GetCvarValue("bg_awsLogLevel", awsLogLevel);
+ if (awsLogLevel >= 0)
+ {
+ newLevel = static_cast(awsLogLevel);
+ }
}
-
- return newLevel != m_logLevel ? newLevel : m_logLevel;
+ return newLevel;
}
/**
@@ -78,14 +84,12 @@ namespace AWSNativeSDKInit
*/
void AWSLogSystemInterface::LogStream(Aws::Utils::Logging::LogLevel logLevel, const char* tag, const Aws::OStringStream &messageStream)
{
-
if(!ShouldLog(logLevel))
{
return;
}
ForwardAwsApiLogMessage(logLevel, tag, messageStream.str().c_str());
-
}
bool AWSLogSystemInterface::ShouldLog(Aws::Utils::Logging::LogLevel logLevel)
@@ -93,7 +97,7 @@ namespace AWSNativeSDKInit
#if defined(PLATFORM_SUPPORTS_AWS_NATIVE_SDK)
Aws::Utils::Logging::LogLevel newLevel = GetLogLevel();
- if (newLevel > Aws::Utils::Logging::LogLevel::Info && newLevel <= Aws::Utils::Logging::LogLevel::Trace && newLevel != m_logLevel)
+ if (newLevel != m_logLevel)
{
SetLogLevel(newLevel);
}
@@ -124,7 +128,7 @@ namespace AWSNativeSDKInit
break;
case Aws::Utils::Logging::LogLevel::Error:
- AZ::Debug::Trace::Instance().Warning(__FILE__, __LINE__, AZ_FUNCTION_SIGNATURE, AWSLogSystemInterface::ERROR_WINDOW_NAME, MESSAGE_FORMAT, tag, message);
+ AZ::Debug::Trace::Instance().Error(__FILE__, __LINE__, AZ_FUNCTION_SIGNATURE, AWSLogSystemInterface::ERROR_WINDOW_NAME, MESSAGE_FORMAT, tag, message);
break;
case Aws::Utils::Logging::LogLevel::Warn:
diff --git a/Code/Tools/AWSNativeSDKInit/source/AWSNativeSDKInit.cpp b/Code/Tools/AWSNativeSDKInit/source/AWSNativeSDKInit.cpp
index 815fc1bbf0..ca63859945 100644
--- a/Code/Tools/AWSNativeSDKInit/source/AWSNativeSDKInit.cpp
+++ b/Code/Tools/AWSNativeSDKInit/source/AWSNativeSDKInit.cpp
@@ -64,10 +64,10 @@ namespace AWSNativeSDKInit
{
#if defined(PLATFORM_SUPPORTS_AWS_NATIVE_SDK)
Aws::Utils::Logging::LogLevel logLevel;
-#ifdef _DEBUG
+#if defined(AZ_DEBUG_BUILD) || defined(AZ_PROFILE_BUILD)
logLevel = Aws::Utils::Logging::LogLevel::Warn;
#else
- logLevel = Aws::Utils::Logging::LogLevel::Warn;
+ logLevel = Aws::Utils::Logging::LogLevel::Error;
#endif
m_awsSDKOptions.loggingOptions.logLevel = logLevel;
m_awsSDKOptions.loggingOptions.logger_create_fn = [logLevel]()
diff --git a/Code/Tools/AWSNativeSDKInit/tests/AWSLogSystemInterfaceTest.cpp b/Code/Tools/AWSNativeSDKInit/tests/AWSLogSystemInterfaceTest.cpp
new file mode 100644
index 0000000000..02b6cbebc1
--- /dev/null
+++ b/Code/Tools/AWSNativeSDKInit/tests/AWSLogSystemInterfaceTest.cpp
@@ -0,0 +1,169 @@
+/*
+ * Copyright (c) Contributors to the Open 3D Engine Project.
+ * For complete copyright and license terms please see the LICENSE at the root of this distribution.
+ *
+ * SPDX-License-Identifier: Apache-2.0 OR MIT
+ *
+ */
+
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+#include
+
+using namespace AWSNativeSDKInit;
+
+class AWSLogSystemInterfaceTest
+ : public UnitTest::ScopedAllocatorSetupFixture
+ , public AZ::Debug::TraceMessageBus::Handler
+{
+public:
+ bool OnPreAssert(const char*, int, const char*, const char*) override
+ {
+ return true;
+ }
+
+ bool OnPreError(const char*, const char*, int, const char*, const char*) override
+ {
+ m_error = true;
+ return true;
+ }
+
+ bool OnPreWarning(const char*, const char*, int, const char*, const char*) override
+ {
+ m_warning = true;
+ return true;
+ }
+
+ bool OnPrintf(const char*, const char*) override
+ {
+ m_printf = true;
+ return true;
+ }
+
+ void SetUp() override
+ {
+ BusConnect();
+ if (!AZ::Interface::Get())
+ {
+ m_console = AZStd::make_unique();
+ m_console->LinkDeferredFunctors(AZ::ConsoleFunctorBase::GetDeferredHead());
+ AZ::Interface::Register(m_console.get());
+ }
+ }
+
+ void TearDown() override
+ {
+ if (m_console)
+ {
+ AZ::Interface::Unregister(m_console.get());
+ m_console.reset();
+ }
+ BusDisconnect();
+ }
+
+ bool m_error = false;
+ bool m_warning = false;
+ bool m_printf = false;
+
+private:
+ AZStd::unique_ptr m_console;
+};
+
+TEST_F(AWSLogSystemInterfaceTest, LogStream_LogFatalMessage_GetExpectedNotification)
+{
+ AWSLogSystemInterface logSystem(Aws::Utils::Logging::LogLevel::Trace);
+ Aws::OStringStream testString;
+ logSystem.LogStream(Aws::Utils::Logging::LogLevel::Fatal, "test", testString);
+ ASSERT_TRUE(m_error);
+ ASSERT_FALSE(m_warning);
+ ASSERT_FALSE(m_printf);
+}
+
+TEST_F(AWSLogSystemInterfaceTest, LogStream_LogErrorMessage_GetExpectedNotification)
+{
+ AWSLogSystemInterface logSystem(Aws::Utils::Logging::LogLevel::Trace);
+ Aws::OStringStream testString;
+ logSystem.LogStream(Aws::Utils::Logging::LogLevel::Error, "test", testString);
+ ASSERT_TRUE(m_error);
+ ASSERT_FALSE(m_warning);
+ ASSERT_FALSE(m_printf);
+}
+
+TEST_F(AWSLogSystemInterfaceTest, LogStream_LogWarningMessage_GetExpectedNotification)
+{
+ AWSLogSystemInterface logSystem(Aws::Utils::Logging::LogLevel::Trace);
+ Aws::OStringStream testString;
+ logSystem.LogStream(Aws::Utils::Logging::LogLevel::Warn, "test", testString);
+ ASSERT_FALSE(m_error);
+ ASSERT_TRUE(m_warning);
+ ASSERT_FALSE(m_printf);
+}
+
+TEST_F(AWSLogSystemInterfaceTest, LogStream_LogInfoMessage_GetExpectedNotification)
+{
+ AWSLogSystemInterface logSystem(Aws::Utils::Logging::LogLevel::Trace);
+ Aws::OStringStream testString;
+ logSystem.LogStream(Aws::Utils::Logging::LogLevel::Info, "test", testString);
+ ASSERT_FALSE(m_error);
+ ASSERT_FALSE(m_warning);
+ ASSERT_TRUE(m_printf);
+}
+
+TEST_F(AWSLogSystemInterfaceTest, LogStream_LogDebugMessage_GetExpectedNotification)
+{
+ AWSLogSystemInterface logSystem(Aws::Utils::Logging::LogLevel::Trace);
+ Aws::OStringStream testString;
+ logSystem.LogStream(Aws::Utils::Logging::LogLevel::Debug, "test", testString);
+ ASSERT_FALSE(m_error);
+ ASSERT_FALSE(m_warning);
+ ASSERT_TRUE(m_printf);
+}
+
+TEST_F(AWSLogSystemInterfaceTest, LogStream_LogTraceMessage_GetExpectedNotification)
+{
+ AWSLogSystemInterface logSystem(Aws::Utils::Logging::LogLevel::Trace);
+ Aws::OStringStream testString;
+ logSystem.LogStream(Aws::Utils::Logging::LogLevel::Trace, "test", testString);
+ ASSERT_FALSE(m_error);
+ ASSERT_FALSE(m_warning);
+ ASSERT_TRUE(m_printf);
+}
+
+TEST_F(AWSLogSystemInterfaceTest, LogStream_OverrideWarnAndLogInfoMessage_GetExpectedNotification)
+{
+ AWSLogSystemInterface logSystem(Aws::Utils::Logging::LogLevel::Trace);
+ Aws::OStringStream testString;
+ AZ::Interface::Get()->PerformCommand("bg_awsLogLevel 3");
+ logSystem.LogStream(Aws::Utils::Logging::LogLevel::Info, "test", testString);
+ ASSERT_FALSE(m_error);
+ ASSERT_FALSE(m_warning);
+ ASSERT_FALSE(m_printf);
+}
+
+TEST_F(AWSLogSystemInterfaceTest, LogStream_OverrideWarnAndLogeErrorMessage_GetExpectedNotification)
+{
+ AWSLogSystemInterface logSystem(Aws::Utils::Logging::LogLevel::Trace);
+ Aws::OStringStream testString;
+ AZ::Interface::Get()->PerformCommand("bg_awsLogLevel 3");
+ logSystem.LogStream(Aws::Utils::Logging::LogLevel::Error, "test", testString);
+ ASSERT_TRUE(m_error);
+ ASSERT_FALSE(m_warning);
+ ASSERT_FALSE(m_printf);
+}
+
+TEST_F(AWSLogSystemInterfaceTest, LogStream_OverrideOffAndLogInfoMessage_GetExpectedNotification)
+{
+ AWSLogSystemInterface logSystem(Aws::Utils::Logging::LogLevel::Trace);
+ Aws::OStringStream testString;
+ AZ::Interface::Get()->PerformCommand("bg_awsLogLevel 0");
+ logSystem.LogStream(Aws::Utils::Logging::LogLevel::Info, "test", testString);
+ ASSERT_FALSE(m_error);
+ ASSERT_FALSE(m_warning);
+ ASSERT_FALSE(m_printf);
+}
diff --git a/Code/Tools/AWSNativeSDKInit/tests/AWSNativeSDKInitTest.cpp b/Code/Tools/AWSNativeSDKInit/tests/AWSNativeSDKInitTest.cpp
new file mode 100644
index 0000000000..40217ff9bc
--- /dev/null
+++ b/Code/Tools/AWSNativeSDKInit/tests/AWSNativeSDKInitTest.cpp
@@ -0,0 +1,11 @@
+/*
+ * Copyright (c) Contributors to the Open 3D Engine Project.
+ * For complete copyright and license terms please see the LICENSE at the root of this distribution.
+ *
+ * SPDX-License-Identifier: Apache-2.0 OR MIT
+ *
+ */
+
+#include
+
+AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV);
diff --git a/Gems/AWSClientAuth/Code/Tests/Authorization/AWSCognitoAuthorizationControllerTest.cpp b/Gems/AWSClientAuth/Code/Tests/Authorization/AWSCognitoAuthorizationControllerTest.cpp
index 9f31891512..2269a2340a 100644
--- a/Gems/AWSClientAuth/Code/Tests/Authorization/AWSCognitoAuthorizationControllerTest.cpp
+++ b/Gems/AWSClientAuth/Code/Tests/Authorization/AWSCognitoAuthorizationControllerTest.cpp
@@ -140,7 +140,9 @@ TEST_F(AWSCognitoAuthorizationControllerTest, RequestAWSCredentials_Fail_GetIdEr
EXPECT_CALL(*m_cognitoIdentityClientMock, GetCredentialsForIdentity(testing::_)).Times(0);
EXPECT_CALL(m_awsCognitoAuthorizationNotificationsBusMock, OnRequestAWSCredentialsSuccess(testing::_)).Times(0);
EXPECT_CALL(m_awsCognitoAuthorizationNotificationsBusMock, OnRequestAWSCredentialsFail(testing::_)).Times(1);
+ AZ_TEST_START_TRACE_SUPPRESSION;
m_mockController->RequestAWSCredentialsAsync();
+ AZ_TEST_STOP_TRACE_SUPPRESSION_NO_COUNT;
}
TEST_F(AWSCognitoAuthorizationControllerTest, RequestAWSCredentials_Fail_GetCredentialsForIdentityError)
@@ -174,7 +176,9 @@ TEST_F(AWSCognitoAuthorizationControllerTest, RequestAWSCredentials_Fail_GetCred
EXPECT_CALL(*m_cognitoIdentityClientMock, GetCredentialsForIdentity(testing::_)).Times(1).WillOnce(testing::Return(outcome));
EXPECT_CALL(m_awsCognitoAuthorizationNotificationsBusMock, OnRequestAWSCredentialsSuccess(testing::_)).Times(0);
EXPECT_CALL(m_awsCognitoAuthorizationNotificationsBusMock, OnRequestAWSCredentialsFail(testing::_)).Times(1);
+ AZ_TEST_START_TRACE_SUPPRESSION;
m_mockController->RequestAWSCredentialsAsync();
+ AZ_TEST_STOP_TRACE_SUPPRESSION_NO_COUNT;
}
TEST_F(AWSCognitoAuthorizationControllerTest, AddRemoveLogins_Succuess)
@@ -331,8 +335,10 @@ TEST_F(AWSCognitoAuthorizationControllerTest, GetCredentialsProvider_NoPersisted
EXPECT_CALL(*m_cognitoIdentityClientMock, GetCredentialsForIdentity(testing::_)).Times(0);
std::shared_ptr actualCredentialsProvider;
+ AZ_TEST_START_TRACE_SUPPRESSION;
AWSCore::AWSCredentialRequestBus::BroadcastResult(
actualCredentialsProvider, &AWSCore::AWSCredentialRequests::GetCredentialsProvider);
+ AZ_TEST_STOP_TRACE_SUPPRESSION_NO_COUNT;
EXPECT_TRUE(actualCredentialsProvider == nullptr);
}
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/CMakeLists.txt b/Gems/AWSGameLift/Code/AWSGameLiftClient/CMakeLists.txt
index 1fab09e9f4..ab85e89f75 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/CMakeLists.txt
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/CMakeLists.txt
@@ -6,8 +6,6 @@
#
#
-set(awsgameliftclient_compile_definition $,AWSGAMELIFT_RELEASE,AWSGAMELIFT_DEV>)
-
ly_add_target(
NAME AWSGameLift.Client.Static STATIC
NAMESPACE Gem
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/AWSGameLiftClientManager.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/AWSGameLiftClientManager.cpp
index 4ee2d31ebf..f900310078 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/AWSGameLiftClientManager.cpp
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/AWSGameLiftClientManager.cpp
@@ -33,7 +33,7 @@
namespace AWSGameLift
{
-#if defined(AWSGAMELIFT_DEV)
+#if defined(AZ_DEBUG_BUILD) || defined(AZ_PROFILE_BUILD)
AZ_CVAR(AZ::CVarFixedString, cl_gameliftLocalEndpoint, "", nullptr, AZ::ConsoleFunctorFlags::Null, "The local endpoint to test with GameLiftLocal SDK.");
#endif
@@ -87,7 +87,7 @@ namespace AWSGameLift
// Set up client endpoint or region
AZStd::string localEndpoint = "";
-#if defined(AWSGAMELIFT_DEV)
+#if defined(AZ_DEBUG_BUILD) || defined(AZ_PROFILE_BUILD)
localEndpoint = static_cast(cl_gameliftLocalEndpoint);
#endif
if (!localEndpoint.empty())
@@ -139,7 +139,7 @@ namespace AWSGameLift
{
const AWSGameLiftAcceptMatchRequest& gameliftStartMatchmakingRequest =
static_cast(acceptMatchRequest);
- AcceptMatchHelper(gameliftStartMatchmakingRequest);
+ AcceptMatchActivity::AcceptMatch(gameliftStartMatchmakingRequest);
}
}
@@ -157,9 +157,9 @@ namespace AWSGameLift
AZ::JobContext* jobContext = nullptr;
AWSCore::AWSCoreRequestBus::BroadcastResult(jobContext, &AWSCore::AWSCoreRequests::GetDefaultJobContext);
AZ::Job* acceptMatchJob = AZ::CreateJobFunction(
- [this, gameliftStartMatchmakingRequest]()
+ [gameliftStartMatchmakingRequest]()
{
- AcceptMatchHelper(gameliftStartMatchmakingRequest);
+ AcceptMatchActivity::AcceptMatch(gameliftStartMatchmakingRequest);
AzFramework::MatchmakingAsyncRequestNotificationBus::Broadcast(
&AzFramework::MatchmakingAsyncRequestNotifications::OnAcceptMatchAsyncComplete);
@@ -169,21 +169,6 @@ namespace AWSGameLift
acceptMatchJob->Start();
}
- void AWSGameLiftClientManager::AcceptMatchHelper(const AWSGameLiftAcceptMatchRequest& acceptMatchRequest)
- {
- auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient();
-
- AZStd::string response;
- if (!gameliftClient)
- {
- AZ_Error(AWSGameLiftClientManagerName, false, AWSGameLiftClientMissingErrorMessage);
- }
- else
- {
- AcceptMatchActivity::AcceptMatch(*gameliftClient, acceptMatchRequest);
- }
- }
-
AZStd::string AWSGameLiftClientManager::CreateSession(const AzFramework::CreateSessionRequest& createSessionRequest)
{
AZStd::string result = "";
@@ -191,13 +176,13 @@ namespace AWSGameLift
{
const AWSGameLiftCreateSessionRequest& gameliftCreateSessionRequest =
static_cast(createSessionRequest);
- result = CreateSessionHelper(gameliftCreateSessionRequest);
+ result = CreateSessionActivity::CreateSession(gameliftCreateSessionRequest);
}
else if (CreateSessionOnQueueActivity::ValidateCreateSessionOnQueueRequest(createSessionRequest))
{
const AWSGameLiftCreateSessionOnQueueRequest& gameliftCreateSessionOnQueueRequest =
static_cast(createSessionRequest);
- result = CreateSessionOnQueueHelper(gameliftCreateSessionOnQueueRequest);
+ result = CreateSessionOnQueueActivity::CreateSessionOnQueue(gameliftCreateSessionOnQueueRequest);
}
else
{
@@ -217,9 +202,9 @@ namespace AWSGameLift
AZ::JobContext* jobContext = nullptr;
AWSCore::AWSCoreRequestBus::BroadcastResult(jobContext, &AWSCore::AWSCoreRequests::GetDefaultJobContext);
AZ::Job* createSessionJob = AZ::CreateJobFunction(
- [this, gameliftCreateSessionRequest]()
+ [gameliftCreateSessionRequest]()
{
- AZStd::string result = CreateSessionHelper(gameliftCreateSessionRequest);
+ AZStd::string result = CreateSessionActivity::CreateSession(gameliftCreateSessionRequest);
AzFramework::SessionAsyncRequestNotificationBus::Broadcast(
&AzFramework::SessionAsyncRequestNotifications::OnCreateSessionAsyncComplete, result);
@@ -235,9 +220,9 @@ namespace AWSGameLift
AZ::JobContext* jobContext = nullptr;
AWSCore::AWSCoreRequestBus::BroadcastResult(jobContext, &AWSCore::AWSCoreRequests::GetDefaultJobContext);
AZ::Job* createSessionOnQueueJob = AZ::CreateJobFunction(
- [this, gameliftCreateSessionOnQueueRequest]()
+ [gameliftCreateSessionOnQueueRequest]()
{
- AZStd::string result = CreateSessionOnQueueHelper(gameliftCreateSessionOnQueueRequest);
+ AZStd::string result = CreateSessionOnQueueActivity::CreateSessionOnQueue(gameliftCreateSessionOnQueueRequest);
AzFramework::SessionAsyncRequestNotificationBus::Broadcast(
&AzFramework::SessionAsyncRequestNotifications::OnCreateSessionAsyncComplete, result);
@@ -253,38 +238,6 @@ namespace AWSGameLift
}
}
- AZStd::string AWSGameLiftClientManager::CreateSessionHelper(
- const AWSGameLiftCreateSessionRequest& createSessionRequest)
- {
- auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient();
- AZStd::string result = "";
- if (!gameliftClient)
- {
- AZ_Error(AWSGameLiftClientManagerName, false, AWSGameLiftClientMissingErrorMessage);
- }
- else
- {
- result = CreateSessionActivity::CreateSession(*gameliftClient, createSessionRequest);
- }
- return result;
- }
-
- AZStd::string AWSGameLiftClientManager::CreateSessionOnQueueHelper(
- const AWSGameLiftCreateSessionOnQueueRequest& createSessionOnQueueRequest)
- {
- auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient();
- AZStd::string result;
- if (!gameliftClient)
- {
- AZ_Error(AWSGameLiftClientManagerName, false, AWSGameLiftClientMissingErrorMessage);
- }
- else
- {
- result = CreateSessionOnQueueActivity::CreateSessionOnQueue(*gameliftClient, createSessionOnQueueRequest);
- }
- return result;
- }
-
bool AWSGameLiftClientManager::JoinSession(const AzFramework::JoinSessionRequest& joinSessionRequest)
{
bool result = false;
@@ -292,7 +245,8 @@ namespace AWSGameLift
{
const AWSGameLiftJoinSessionRequest& gameliftJoinSessionRequest =
static_cast(joinSessionRequest);
- result = JoinSessionHelper(gameliftJoinSessionRequest);
+ auto createPlayerSessionOutcome = JoinSessionActivity::CreatePlayerSession(gameliftJoinSessionRequest);
+ result = JoinSessionActivity::RequestPlayerJoinSession(createPlayerSessionOutcome);
}
return result;
@@ -313,9 +267,10 @@ namespace AWSGameLift
AZ::JobContext* jobContext = nullptr;
AWSCore::AWSCoreRequestBus::BroadcastResult(jobContext, &AWSCore::AWSCoreRequests::GetDefaultJobContext);
AZ::Job* joinSessionJob = AZ::CreateJobFunction(
- [this, gameliftJoinSessionRequest]()
+ [gameliftJoinSessionRequest]()
{
- bool result = JoinSessionHelper(gameliftJoinSessionRequest);
+ auto createPlayerSessionOutcome = JoinSessionActivity::CreatePlayerSession(gameliftJoinSessionRequest);
+ bool result = JoinSessionActivity::RequestPlayerJoinSession(createPlayerSessionOutcome);
AzFramework::SessionAsyncRequestNotificationBus::Broadcast(
&AzFramework::SessionAsyncRequestNotifications::OnJoinSessionAsyncComplete, result);
@@ -325,23 +280,6 @@ namespace AWSGameLift
joinSessionJob->Start();
}
- bool AWSGameLiftClientManager::JoinSessionHelper(const AWSGameLiftJoinSessionRequest& joinSessionRequest)
- {
- auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient();
- bool result = false;
- if (!gameliftClient)
- {
- AZ_Error(AWSGameLiftClientManagerName, false, AWSGameLiftClientMissingErrorMessage);
- }
- else
- {
- auto createPlayerSessionOutcome = JoinSessionActivity::CreatePlayerSession(*gameliftClient, joinSessionRequest);
-
- result = JoinSessionActivity::RequestPlayerJoinSession(createPlayerSessionOutcome);
- }
- return result;
- }
-
void AWSGameLiftClientManager::LeaveSession()
{
AWSGameLift::LeaveSessionActivity::LeaveSession();
@@ -371,7 +309,7 @@ namespace AWSGameLift
{
const AWSGameLiftSearchSessionsRequest& gameliftSearchSessionsRequest =
static_cast(searchSessionsRequest);
- response = SearchSessionsHelper(gameliftSearchSessionsRequest);
+ response = SearchSessionsActivity::SearchSessions(gameliftSearchSessionsRequest);
}
return response;
@@ -392,9 +330,9 @@ namespace AWSGameLift
AZ::JobContext* jobContext = nullptr;
AWSCore::AWSCoreRequestBus::BroadcastResult(jobContext, &AWSCore::AWSCoreRequests::GetDefaultJobContext);
AZ::Job* searchSessionsJob = AZ::CreateJobFunction(
- [this, gameliftSearchSessionsRequest]()
+ [gameliftSearchSessionsRequest]()
{
- AzFramework::SearchSessionsResponse response = SearchSessionsHelper(gameliftSearchSessionsRequest);
+ AzFramework::SearchSessionsResponse response = SearchSessionsActivity::SearchSessions(gameliftSearchSessionsRequest);
AzFramework::SessionAsyncRequestNotificationBus::Broadcast(
&AzFramework::SessionAsyncRequestNotifications::OnSearchSessionsAsyncComplete, response);
@@ -404,22 +342,6 @@ namespace AWSGameLift
searchSessionsJob->Start();
}
- AzFramework::SearchSessionsResponse AWSGameLiftClientManager::SearchSessionsHelper(
- const AWSGameLiftSearchSessionsRequest& searchSessionsRequest) const
- {
- auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient();
- AzFramework::SearchSessionsResponse response;
- if (!gameliftClient)
- {
- AZ_Error(AWSGameLiftClientManagerName, false, AWSGameLiftClientMissingErrorMessage);
- }
- else
- {
- response = SearchSessionsActivity::SearchSessions(*gameliftClient, searchSessionsRequest);
- }
- return response;
- }
-
AZStd::string AWSGameLiftClientManager::StartMatchmaking(const AzFramework::StartMatchmakingRequest& startMatchmakingRequest)
{
AZStd::string response;
@@ -427,7 +349,7 @@ namespace AWSGameLift
{
const AWSGameLiftStartMatchmakingRequest& gameliftStartMatchmakingRequest =
static_cast(startMatchmakingRequest);
- response = StartMatchmakingHelper(gameliftStartMatchmakingRequest);
+ response = StartMatchmakingActivity::StartMatchmaking(gameliftStartMatchmakingRequest);
}
return response;
@@ -448,9 +370,9 @@ namespace AWSGameLift
AZ::JobContext* jobContext = nullptr;
AWSCore::AWSCoreRequestBus::BroadcastResult(jobContext, &AWSCore::AWSCoreRequests::GetDefaultJobContext);
AZ::Job* startMatchmakingJob = AZ::CreateJobFunction(
- [this, gameliftStartMatchmakingRequest]()
+ [gameliftStartMatchmakingRequest]()
{
- AZStd::string response = StartMatchmakingHelper(gameliftStartMatchmakingRequest);
+ AZStd::string response = StartMatchmakingActivity::StartMatchmaking(gameliftStartMatchmakingRequest);
AzFramework::MatchmakingAsyncRequestNotificationBus::Broadcast(
&AzFramework::MatchmakingAsyncRequestNotifications::OnStartMatchmakingAsyncComplete, response);
@@ -460,29 +382,14 @@ namespace AWSGameLift
startMatchmakingJob->Start();
}
- AZStd::string AWSGameLiftClientManager::StartMatchmakingHelper(const AWSGameLiftStartMatchmakingRequest& startMatchmakingRequest)
- {
- auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient();
-
- AZStd::string response;
- if (!gameliftClient)
- {
- AZ_Error(AWSGameLiftClientManagerName, false, AWSGameLiftClientMissingErrorMessage);
- }
- else
- {
- response = StartMatchmakingActivity::StartMatchmaking(*gameliftClient, startMatchmakingRequest);
- }
- return response;
- }
-
void AWSGameLiftClientManager::StopMatchmaking(const AzFramework::StopMatchmakingRequest& stopMatchmakingRequest)
{
if (StopMatchmakingActivity::ValidateStopMatchmakingRequest(stopMatchmakingRequest))
{
const AWSGameLiftStopMatchmakingRequest& gameliftStopMatchmakingRequest =
static_cast(stopMatchmakingRequest);
- StopMatchmakingHelper(gameliftStopMatchmakingRequest);
+
+ StopMatchmakingActivity::StopMatchmaking(gameliftStopMatchmakingRequest);
}
}
@@ -501,9 +408,9 @@ namespace AWSGameLift
AZ::JobContext* jobContext = nullptr;
AWSCore::AWSCoreRequestBus::BroadcastResult(jobContext, &AWSCore::AWSCoreRequests::GetDefaultJobContext);
AZ::Job* stopMatchmakingJob = AZ::CreateJobFunction(
- [this, gameliftStopMatchmakingRequest]()
+ [gameliftStopMatchmakingRequest]()
{
- StopMatchmakingHelper(gameliftStopMatchmakingRequest);
+ StopMatchmakingActivity::StopMatchmaking(gameliftStopMatchmakingRequest);
AzFramework::MatchmakingAsyncRequestNotificationBus::Broadcast(
&AzFramework::MatchmakingAsyncRequestNotifications::OnStopMatchmakingAsyncComplete);
@@ -512,18 +419,4 @@ namespace AWSGameLift
stopMatchmakingJob->Start();
}
-
- void AWSGameLiftClientManager::StopMatchmakingHelper(const AWSGameLiftStopMatchmakingRequest& stopMatchmakingRequest)
- {
- auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient();
-
- if (!gameliftClient)
- {
- AZ_Error(AWSGameLiftClientManagerName, false, AWSGameLiftClientMissingErrorMessage);
- }
- else
- {
- StopMatchmakingActivity::StopMatchmaking(*gameliftClient, stopMatchmakingRequest);
- }
- }
} // namespace AWSGameLift
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/AWSGameLiftClientManager.h b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/AWSGameLiftClientManager.h
index 8a0c91c36d..f37152bc60 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/AWSGameLiftClientManager.h
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/AWSGameLiftClientManager.h
@@ -175,14 +175,5 @@ namespace AWSGameLift
bool JoinSession(const AzFramework::JoinSessionRequest& joinSessionRequest) override;
AzFramework::SearchSessionsResponse SearchSessions(const AzFramework::SearchSessionsRequest& searchSessionsRequest) const override;
void LeaveSession() override;
-
- private:
- void AcceptMatchHelper(const AWSGameLiftAcceptMatchRequest& createSessionRequest);
- AZStd::string CreateSessionHelper(const AWSGameLiftCreateSessionRequest& createSessionRequest);
- AZStd::string CreateSessionOnQueueHelper(const AWSGameLiftCreateSessionOnQueueRequest& createSessionOnQueueRequest);
- bool JoinSessionHelper(const AWSGameLiftJoinSessionRequest& joinSessionRequest);
- AzFramework::SearchSessionsResponse SearchSessionsHelper(const AWSGameLiftSearchSessionsRequest& searchSessionsRequest) const;
- AZStd::string StartMatchmakingHelper(const AWSGameLiftStartMatchmakingRequest& startMatchmakingRequest);
- void StopMatchmakingHelper(const AWSGameLiftStopMatchmakingRequest& stopMatchmakingRequest);
};
} // namespace AWSGameLift
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftAcceptMatchActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftAcceptMatchActivity.cpp
index 25ba328fd0..dbeced1728 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftAcceptMatchActivity.cpp
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftAcceptMatchActivity.cpp
@@ -7,9 +7,11 @@
*/
#include
+#include
#include
#include
+#include
#include
#include
@@ -42,13 +44,19 @@ namespace AWSGameLift
return request;
}
- void AcceptMatch(const Aws::GameLift::GameLiftClient& gameliftClient,
- const AWSGameLiftAcceptMatchRequest& AcceptMatchRequest)
+ void AcceptMatch(const AWSGameLiftAcceptMatchRequest& AcceptMatchRequest)
{
+ auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient();
+ if (!gameliftClient)
+ {
+ AZ_Error(AWSGameLiftAcceptMatchActivityName, false, AWSGameLiftClientMissingErrorMessage);
+ return;
+ }
+
AZ_TracePrintf(AWSGameLiftAcceptMatchActivityName, "Requesting AcceptMatch against Amazon GameLift service ...");
Aws::GameLift::Model::AcceptMatchRequest request = BuildAWSGameLiftAcceptMatchRequest(AcceptMatchRequest);
- auto AcceptMatchOutcome = gameliftClient.AcceptMatch(request);
+ auto AcceptMatchOutcome = gameliftClient->AcceptMatch(request);
if (AcceptMatchOutcome.IsSuccess())
{
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftAcceptMatchActivity.h b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftAcceptMatchActivity.h
index d5f28f92e2..ac4012c347 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftAcceptMatchActivity.h
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftAcceptMatchActivity.h
@@ -23,7 +23,7 @@ namespace AWSGameLift
Aws::GameLift::Model::AcceptMatchRequest BuildAWSGameLiftAcceptMatchRequest(const AWSGameLiftAcceptMatchRequest& AcceptMatchRequest);
// Create AcceptMatchRequest and make a AcceptMatch call through GameLift client
- void AcceptMatch(const Aws::GameLift::GameLiftClient& gameliftClient, const AWSGameLiftAcceptMatchRequest& AcceptMatchRequest);
+ void AcceptMatch(const AWSGameLiftAcceptMatchRequest& AcceptMatchRequest);
// Validate AcceptMatchRequest and check required request parameters
bool ValidateAcceptMatchRequest(const AzFramework::AcceptMatchRequest& AcceptMatchRequest);
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.cpp
index 0332ea7a76..ee93f022a1 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.cpp
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.cpp
@@ -6,9 +6,16 @@
*
*/
+#include
+#include
+
#include
#include
#include
+#include
+
+#include
+#include
namespace AWSGameLift
{
@@ -63,15 +70,21 @@ namespace AWSGameLift
return request;
}
- AZStd::string CreateSession(
- const Aws::GameLift::GameLiftClient& gameliftClient,
- const AWSGameLiftCreateSessionRequest& createSessionRequest)
+ AZStd::string CreateSession(const AWSGameLiftCreateSessionRequest& createSessionRequest)
{
+ AZStd::string result = "";
+
+ auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient();
+ if (!gameliftClient)
+ {
+ AZ_Error(AWSGameLiftCreateSessionActivityName, false, AWSGameLiftClientMissingErrorMessage);
+ return result;
+ }
+
AZ_TracePrintf(AWSGameLiftCreateSessionActivityName, "Requesting CreateGameSession against Amazon GameLift service ...");
- AZStd::string result = "";
Aws::GameLift::Model::CreateGameSessionRequest request = BuildAWSGameLiftCreateGameSessionRequest(createSessionRequest);
- auto createSessionOutcome = gameliftClient.CreateGameSession(request);
+ auto createSessionOutcome = gameliftClient->CreateGameSession(request);
AZ_TracePrintf(AWSGameLiftCreateSessionActivityName, "CreateGameSession request against Amazon GameLift service is complete");
if (createSessionOutcome.IsSuccess())
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.h b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.h
index 714675c652..af236dbfa4 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.h
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.h
@@ -10,9 +10,7 @@
#include
-#include
#include
-#include
namespace AWSGameLift
{
@@ -24,9 +22,7 @@ namespace AWSGameLift
Aws::GameLift::Model::CreateGameSessionRequest BuildAWSGameLiftCreateGameSessionRequest(const AWSGameLiftCreateSessionRequest& createSessionRequest);
// Create CreateGameSessionRequest and make a CreateGameSession call through GameLift client
- AZStd::string CreateSession(
- const Aws::GameLift::GameLiftClient& gameliftClient,
- const AWSGameLiftCreateSessionRequest& createSessionRequest);
+ AZStd::string CreateSession(const AWSGameLiftCreateSessionRequest& createSessionRequest);
// Validate CreateSessionRequest and check required request parameters
bool ValidateCreateSessionRequest(const AzFramework::CreateSessionRequest& createSessionRequest);
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.cpp
index 52be365ea5..8e8d7e23c5 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.cpp
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.cpp
@@ -6,9 +6,16 @@
*
*/
+#include
+#include
+
#include
#include
#include
+#include
+
+#include
+#include
namespace AWSGameLift
{
@@ -47,17 +54,23 @@ namespace AWSGameLift
return request;
}
- AZStd::string CreateSessionOnQueue(
- const Aws::GameLift::GameLiftClient& gameliftClient,
- const AWSGameLiftCreateSessionOnQueueRequest& createSessionOnQueueRequest)
+ AZStd::string CreateSessionOnQueue(const AWSGameLiftCreateSessionOnQueueRequest& createSessionOnQueueRequest)
{
+ AZStd::string result = "";
+
+ auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient();
+ if (!gameliftClient)
+ {
+ AZ_Error(AWSGameLiftCreateSessionOnQueueActivityName, false, AWSGameLiftClientMissingErrorMessage);
+ return result;
+ }
+
AZ_TracePrintf(AWSGameLiftCreateSessionOnQueueActivityName,
"Requesting StartGameSessionPlacement against Amazon GameLift service ...");
- AZStd::string result = "";
Aws::GameLift::Model::StartGameSessionPlacementRequest request =
BuildAWSGameLiftStartGameSessionPlacementRequest(createSessionOnQueueRequest);
- auto createSessionOnQueueOutcome = gameliftClient.StartGameSessionPlacement(request);
+ auto createSessionOnQueueOutcome = gameliftClient->StartGameSessionPlacement(request);
AZ_TracePrintf(AWSGameLiftCreateSessionOnQueueActivityName,
"StartGameSessionPlacement request against Amazon GameLift service is complete.");
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.h b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.h
index 714bcd1060..5f16bf0b31 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.h
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.h
@@ -10,9 +10,7 @@
#include
-#include
#include
-#include
namespace AWSGameLift
{
@@ -25,9 +23,7 @@ namespace AWSGameLift
const AWSGameLiftCreateSessionOnQueueRequest& createSessionOnQueueRequest);
// Create StartGameSessionPlacementRequest and make a CreateGameSession call through GameLift client
- AZStd::string CreateSessionOnQueue(
- const Aws::GameLift::GameLiftClient& gameliftClient,
- const AWSGameLiftCreateSessionOnQueueRequest& createSessionOnQueueRequest);
+ AZStd::string CreateSessionOnQueue(const AWSGameLiftCreateSessionOnQueueRequest& createSessionOnQueueRequest);
// Validate CreateSessionOnQueueRequest and check required request parameters
bool ValidateCreateSessionOnQueueRequest(const AzFramework::CreateSessionRequest& createSessionRequest);
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.cpp
index a47e59255f..71ef9e9737 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.cpp
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.cpp
@@ -7,10 +7,11 @@
*/
#include
-#include
+#include
#include
#include
+#include
namespace AWSGameLift
{
@@ -59,16 +60,24 @@ namespace AWSGameLift
}
Aws::GameLift::Model::CreatePlayerSessionOutcome CreatePlayerSession(
- const Aws::GameLift::GameLiftClient& gameliftClient,
const AWSGameLiftJoinSessionRequest& joinSessionRequest)
{
+ Aws::GameLift::Model::CreatePlayerSessionOutcome createPlayerSessionOutcome;
+
+ auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient();
+ if (!gameliftClient)
+ {
+ AZ_Error(AWSGameLiftJoinSessionActivityName, false, AWSGameLiftClientMissingErrorMessage);
+ return createPlayerSessionOutcome;
+ }
+
AZ_TracePrintf(AWSGameLiftJoinSessionActivityName,
"Requesting CreatePlayerSession for player %s against Amazon GameLift service ...",
joinSessionRequest.m_playerId.c_str());
Aws::GameLift::Model::CreatePlayerSessionRequest request =
BuildAWSGameLiftCreatePlayerSessionRequest(joinSessionRequest);
- auto createPlayerSessionOutcome = gameliftClient.CreatePlayerSession(request);
+ createPlayerSessionOutcome = gameliftClient->CreatePlayerSession(request);
AZ_TracePrintf(AWSGameLiftJoinSessionActivityName,
"CreatePlayerSession request for player %s against Amazon GameLift service is complete", joinSessionRequest.m_playerId.c_str());
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.h b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.h
index fe34e5fe57..b011f4877b 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.h
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.h
@@ -36,7 +36,6 @@ namespace AWSGameLift
// Create CreatePlayerSessionRequest and make a CreatePlayerSession call through GameLift client
Aws::GameLift::Model::CreatePlayerSessionOutcome CreatePlayerSession(
- const Aws::GameLift::GameLiftClient& gameliftClient,
const AWSGameLiftJoinSessionRequest& joinSessionRequest);
// Request to setup networking connection for player
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftLeaveSessionActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftLeaveSessionActivity.cpp
index a99fed4edc..fd3b3d6ebc 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftLeaveSessionActivity.cpp
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftLeaveSessionActivity.cpp
@@ -6,11 +6,12 @@
*
*/
-#include
-
#include
+#include
#include
+#include
+
namespace AWSGameLift
{
namespace LeaveSessionActivity
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.cpp
index 5f0b6fd012..b7917e6d59 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.cpp
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.cpp
@@ -6,10 +6,16 @@
*
*/
+#include
+#include
#include
#include
#include
+#include
+
+#include
+#include
namespace AWSGameLift
{
@@ -62,14 +68,21 @@ namespace AWSGameLift
}
AzFramework::SearchSessionsResponse SearchSessions(
- const Aws::GameLift::GameLiftClient& gameliftClient,
const AWSGameLiftSearchSessionsRequest& searchSessionsRequest)
{
+ AzFramework::SearchSessionsResponse response;
+
+ auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient();
+ if (!gameliftClient)
+ {
+ AZ_Error(AWSGameLiftSearchSessionsActivityName, false, AWSGameLiftClientMissingErrorMessage);
+ return response;
+ }
+
AZ_TracePrintf(AWSGameLiftSearchSessionsActivityName, "Requesting SearchGameSessions against Amazon GameLift service ...");
- AzFramework::SearchSessionsResponse response;
Aws::GameLift::Model::SearchGameSessionsRequest request = BuildAWSGameLiftSearchGameSessionsRequest(searchSessionsRequest);
- Aws::GameLift::Model::SearchGameSessionsOutcome outcome = gameliftClient.SearchGameSessions(request);
+ Aws::GameLift::Model::SearchGameSessionsOutcome outcome = gameliftClient->SearchGameSessions(request);
AZ_TracePrintf(AWSGameLiftSearchSessionsActivityName, "SearchGameSessions request against Amazon GameLift service is complete");
if (outcome.IsSuccess())
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.h b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.h
index 205e83dd96..d5bcda992c 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.h
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.h
@@ -10,9 +10,7 @@
#include
-#include
#include
-#include
namespace AWSGameLift
{
@@ -28,7 +26,6 @@ namespace AWSGameLift
// Create SearchGameSessionsRequest and make a SeachGameSessions call through GameLift client
AzFramework::SearchSessionsResponse SearchSessions(
- const Aws::GameLift::GameLiftClient& gameliftClient,
const AWSGameLiftSearchSessionsRequest& searchSessionsRequest);
// Convert from Aws::GameLift::Model::SearchGameSessionsResult to AzFramework::SearchSessionsResponse.
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStartMatchmakingActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStartMatchmakingActivity.cpp
index 00a7773491..6f6c7fccc0 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStartMatchmakingActivity.cpp
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStartMatchmakingActivity.cpp
@@ -7,11 +7,13 @@
*/
#include
+#include
#include
#include
#include
#include
+#include
#include
#include
@@ -78,14 +80,21 @@ namespace AWSGameLift
}
AZStd::string StartMatchmaking(
- const Aws::GameLift::GameLiftClient& gameliftClient,
const AWSGameLiftStartMatchmakingRequest& startMatchmakingRequest)
{
+ AZStd::string result = "";
+
+ auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient();
+ if (!gameliftClient)
+ {
+ AZ_Error(AWSGameLiftStartMatchmakingActivityName, false, AWSGameLiftClientMissingErrorMessage);
+ return result;
+ }
+
AZ_TracePrintf(AWSGameLiftStartMatchmakingActivityName, "Requesting StartMatchmaking against Amazon GameLift service ...");
- AZStd::string result = "";
Aws::GameLift::Model::StartMatchmakingRequest request = BuildAWSGameLiftStartMatchmakingRequest(startMatchmakingRequest);
- auto startMatchmakingOutcome = gameliftClient.StartMatchmaking(request);
+ auto startMatchmakingOutcome = gameliftClient->StartMatchmaking(request);
if (startMatchmakingOutcome.IsSuccess())
{
result = AZStd::string(startMatchmakingOutcome.GetResult().GetMatchmakingTicket().GetTicketId().c_str());
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStartMatchmakingActivity.h b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStartMatchmakingActivity.h
index db814c14b2..f736e318fb 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStartMatchmakingActivity.h
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStartMatchmakingActivity.h
@@ -23,7 +23,7 @@ namespace AWSGameLift
Aws::GameLift::Model::StartMatchmakingRequest BuildAWSGameLiftStartMatchmakingRequest(const AWSGameLiftStartMatchmakingRequest& startMatchmakingRequest);
// Create StartMatchmakingRequest and make a StartMatchmaking call through GameLift client
- AZStd::string StartMatchmaking(const Aws::GameLift::GameLiftClient& gameliftClient, const AWSGameLiftStartMatchmakingRequest& startMatchmakingRequest);
+ AZStd::string StartMatchmaking(const AWSGameLiftStartMatchmakingRequest& startMatchmakingRequest);
// Validate StartMatchmakingRequest and check required request parameters
bool ValidateStartMatchmakingRequest(const AzFramework::StartMatchmakingRequest& startMatchmakingRequest);
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStopMatchmakingActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStopMatchmakingActivity.cpp
index b427d0323a..022861570a 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStopMatchmakingActivity.cpp
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStopMatchmakingActivity.cpp
@@ -7,9 +7,11 @@
*/
#include
+#include
#include
#include
+#include
#include
#include
@@ -32,13 +34,19 @@ namespace AWSGameLift
return request;
}
- void StopMatchmaking(const Aws::GameLift::GameLiftClient& gameliftClient,
- const AWSGameLiftStopMatchmakingRequest& stopMatchmakingRequest)
+ void StopMatchmaking(const AWSGameLiftStopMatchmakingRequest& stopMatchmakingRequest)
{
+ auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient();
+ if (!gameliftClient)
+ {
+ AZ_Error(AWSGameLiftStopMatchmakingActivityName, false, AWSGameLiftClientMissingErrorMessage);
+ return;
+ }
+
AZ_TracePrintf(AWSGameLiftStopMatchmakingActivityName, "Requesting StopMatchmaking against Amazon GameLift service ...");
Aws::GameLift::Model::StopMatchmakingRequest request = BuildAWSGameLiftStopMatchmakingRequest(stopMatchmakingRequest);
- auto stopMatchmakingOutcome = gameliftClient.StopMatchmaking(request);
+ auto stopMatchmakingOutcome = gameliftClient->StopMatchmaking(request);
if (stopMatchmakingOutcome.IsSuccess())
{
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStopMatchmakingActivity.h b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStopMatchmakingActivity.h
index 0820f2c05e..b5f19d35df 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStopMatchmakingActivity.h
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStopMatchmakingActivity.h
@@ -23,7 +23,7 @@ namespace AWSGameLift
Aws::GameLift::Model::StopMatchmakingRequest BuildAWSGameLiftStopMatchmakingRequest(const AWSGameLiftStopMatchmakingRequest& stopMatchmakingRequest);
// Create StopMatchmakingRequest and make a StopMatchmaking call through GameLift client
- void StopMatchmaking(const Aws::GameLift::GameLiftClient& gameliftClient, const AWSGameLiftStopMatchmakingRequest& stopMatchmakingRequest);
+ void StopMatchmaking(const AWSGameLiftStopMatchmakingRequest& stopMatchmakingRequest);
// Validate StopMatchmakingRequest and check required request parameters
bool ValidateStopMatchmakingRequest(const AzFramework::StopMatchmakingRequest& stopMatchmakingRequest);
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftCreateSessionActivityTest.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftCreateSessionActivityTest.cpp
index 70dcdba1af..fcf867138b 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftCreateSessionActivityTest.cpp
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftCreateSessionActivityTest.cpp
@@ -9,6 +9,8 @@
#include
#include
+#include
+
using namespace AWSGameLift;
using AWSGameLiftCreateSessionActivityTest = AWSGameLiftClientFixture;
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftCreateSessionOnQueueActivityTest.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftCreateSessionOnQueueActivityTest.cpp
index 8a785d8007..4845586e47 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftCreateSessionOnQueueActivityTest.cpp
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftCreateSessionOnQueueActivityTest.cpp
@@ -9,6 +9,8 @@
#include
#include
+#include
+
using namespace AWSGameLift;
using AWSGameLiftCreateSessionOnQueueActivityTest = AWSGameLiftClientFixture;
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftJoinSessionActivityTest.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftJoinSessionActivityTest.cpp
index 6a1156646a..33b03649c7 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftJoinSessionActivityTest.cpp
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftJoinSessionActivityTest.cpp
@@ -6,6 +6,8 @@
*
*/
+#include
+
#include
#include
diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftSearchSessionsActivityTest.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftSearchSessionsActivityTest.cpp
index 3337c2f6d2..0d3c8c137b 100644
--- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftSearchSessionsActivityTest.cpp
+++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftSearchSessionsActivityTest.cpp
@@ -12,6 +12,9 @@
#include
#include
+#include
+#include
+
using namespace AWSGameLift;
using AWSGameLiftSearchSessionsActivityTest = AWSGameLiftClientFixture;
diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp
index 50af91020a..89053f6349 100644
--- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp
+++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp
@@ -329,15 +329,15 @@ namespace AZ::Render
m_auxVertices.emplace_back(position);
m_auxVertices.emplace_back(position + normal);
}
- }
- RPI::AuxGeomDraw::AuxGeomDynamicDrawArguments lineArgs;
- lineArgs.m_verts = m_auxVertices.data();
- lineArgs.m_vertCount = static_cast(m_auxVertices.size());
- lineArgs.m_colors = &vertexNormalsColor;
- lineArgs.m_colorCount = 1;
- lineArgs.m_depthTest = RPI::AuxGeomDraw::DepthTest::Off;
- auxGeom->DrawLines(lineArgs);
+ RPI::AuxGeomDraw::AuxGeomDynamicDrawArguments lineArgs;
+ lineArgs.m_verts = m_auxVertices.data();
+ lineArgs.m_vertCount = static_cast(m_auxVertices.size());
+ lineArgs.m_colors = &vertexNormalsColor;
+ lineArgs.m_colorCount = 1;
+ lineArgs.m_depthTest = RPI::AuxGeomDraw::DepthTest::Off;
+ auxGeom->DrawLines(lineArgs);
+ }
}
}
diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphReferenceNode.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphReferenceNode.cpp
index 16f192615d..00ff273187 100644
--- a/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphReferenceNode.cpp
+++ b/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphReferenceNode.cpp
@@ -642,6 +642,8 @@ namespace EMotionFX
void AnimGraphReferenceNode::OnAnimGraphAssetChanged()
{
+ AnimGraphNotificationBus::Broadcast(&AnimGraphNotificationBus::Events::OnReferenceAnimGraphAboutToBeChanged, this);
+
ReleaseAnimGraphInstances();
AnimGraphNotificationBus::Broadcast(&AnimGraphNotificationBus::Events::OnReferenceAnimGraphChanged, this);
diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/EditorContextMenu.cpp b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/EditorContextMenu.cpp
index a1e921684f..854918ac19 100644
--- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/EditorContextMenu.cpp
+++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/EditorContextMenu.cpp
@@ -119,6 +119,11 @@ namespace GraphCanvas
m_nodePalette->setProperty("HasNoWindowDecorations", true);
m_nodePalette->SetupNodePalette(config);
+ if (m_userNodePaletteWidth > 0)
+ {
+ m_nodePalette->setFixedWidth(m_userNodePaletteWidth);
+ }
+
QWidgetAction* actionWidget = new QWidgetAction(this);
actionWidget->setDefaultWidget(m_nodePalette);
diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/EditorContextMenu.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/EditorContextMenu.h
index a942858f56..08ee8cecbf 100644
--- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/EditorContextMenu.h
+++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/EditorContextMenu.h
@@ -63,34 +63,34 @@ namespace GraphCanvas
void ResetSourceSlotFilter();
void FilterForSourceSlot(const GraphId& graphId, const AZ::EntityId& sourceSlotId);
- protected slots:
+ protected Q_SLOTS:
virtual void SetupDisplay();
virtual void HandleContextMenuSelection();
protected:
+
virtual void OnRefreshActions(const GraphId& graphId, const AZ::EntityId& targetMemberId);
void keyPressEvent(QKeyEvent* keyEvent) override;
- NodePaletteWidget* m_nodePalette = nullptr;
-
- private:
-
void ConstructMenu();
void AddUnprocessedActions(AZStd::vector& actions);
- bool m_finalized;
- bool m_isToolBarMenu;
+ NodePaletteWidget* m_nodePalette = nullptr;
+
+ bool m_finalized;
+ bool m_isToolBarMenu;
+ AZ::u32 m_userNodePaletteWidth = 300;
EditorId m_editorId;
- AZStd::vector< ActionGroupId > m_actionGroupOrdering;
- AZStd::unordered_set< ActionGroupId > m_actionGroups;
+ AZStd::vector m_actionGroupOrdering;
+ AZStd::unordered_set m_actionGroups;
AZStd::vector m_unprocessedFrontActions;
AZStd::vector m_unprocessedActions;
AZStd::vector m_unprocessedBackActions;
- AZStd::unordered_map< AZStd::string, QMenu* > m_subMenuMap;
+ AZStd::unordered_map m_subMenuMap;
};
}
diff --git a/Gems/ScriptCanvas/Code/Editor/Settings.cpp b/Gems/ScriptCanvas/Code/Editor/Settings.cpp
index fd745fa257..8d24a30aab 100644
--- a/Gems/ScriptCanvas/Code/Editor/Settings.cpp
+++ b/Gems/ScriptCanvas/Code/Editor/Settings.cpp
@@ -395,6 +395,7 @@ namespace ScriptCanvasEditor
->Field("ShowUpgradeDialog", &ScriptCanvasEditorSettings::m_showUpgradeDialog)
->Field("ZoomSettings", &ScriptCanvasEditorSettings::m_zoomSettings)
->Field("ExperimentalSettings", &ScriptCanvasEditorSettings::m_experimentalSettings)
+ ->Field("SceneContextMenuNodePaletteWidth", &ScriptCanvasEditorSettings::m_sceneContextMenuNodePaletteWidth)
;
AZ::EditContext* editContext = serialize->GetEditContext();
@@ -467,13 +468,13 @@ namespace ScriptCanvasEditor
->Attribute(AZ::Edit::Attributes::Visibility, AZ_CRC("PropertyVisibility_ShowChildrenOnly", 0xef428f20))
->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_snapDistance, "Connection Snap Distance", "The distance from a slot under which connections will snap to it.")
->Attribute(AZ::Edit::Attributes::Min, 10.0)
- ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_enableGroupDoubleClickCollapse, "Double Click to Collapse/Uncollapse Group", "Enables the user to decide whether you can double click on a group to collapse/uncollapse a group.")
+ ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_enableGroupDoubleClickCollapse, "Double Click to Collapse/Expand Group", "Enables the user to decide whether you can double click on a group to collapse/expand a group.")
->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_allowBookmarkViewpointControl, "Bookmark Zooming", "Will cause the bookmarks to force the viewport into the state determined by the bookmark type\nBookmark Anchors - The viewport that exists when the bookmark is created.\nNode Groups - The area the Node Group covers")
->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_dragNodeCouplingConfig, "Node Coupling Configuration", "Controls for managing Node Coupling.\nNode Coupling is when you are dragging a node and leave it hovered over another Node, we will try to connect the sides you overlapped with each other.")
->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_dragNodeSplicingConfig, "Drag Node Splicing Configuration", "Controls for managing Node Splicing on a Drag.\nNode Splicing on a Drag will let you drag a node onto a connection, and splice that node onto the specified connection.")
->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_dropNodeSplicingConfig, "Drop Node Splicing Configuration", "Controls for managing Node Splicing on a Drag.\nNode Splicing on a drop will let you drop a node onto a connection from the Node Palette, and splice that node onto the specified connection.")
->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_autoSaveConfig, "AutoSave Configuration", "Controls for managing Auto Saving.\nAuto Saving will occur after the specified time of inactivity on a graph.")
- ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_shakeDespliceConfig, "Shake To Desplice", "Settings that controls various parameters of the Shake to Desplice feature")
+ ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_shakeDespliceConfig, "Shake To De-splice", "Settings that controls various parameters of the Shake to De-splice feature")
->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_allowNodeNudging, "Allow Node Nudging", "Controls whether or not nodes will attempt to nudge each other out of the way under various interactions.")
->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_alignmentTimeMS, "Alignment Time", "Controls the amount of time nodes will take to slide into place when performing alignment commands")
->Attribute(AZ::Edit::Attributes::Min, 0)
@@ -485,8 +486,10 @@ namespace ScriptCanvasEditor
->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_experimentalSettings, "Experimental Settings", "Settings that will control elements that are under development and may not work as expected")
->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_saveRawTranslationOuputToFile, "Save Translation File", "Save out the raw result of translation for debug purposes")
->Attribute(AZ::Edit::Attributes::ChangeNotify, &SettingsCpp::UpdateProcessingSettings)
- ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_printAbstractCodeModel, "Print Abstract Modeld", "Print out the Abstract Code Model to the console at the end of parsing for debug purposes")
+ ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_printAbstractCodeModel, "Print Abstract Model", "Print out the Abstract Code Model to the console at the end of parsing for debug purposes")
->Attribute(AZ::Edit::Attributes::ChangeNotify, &SettingsCpp::UpdateProcessingSettings)
+ ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_sceneContextMenuNodePaletteWidth, "Context Menu Width", "Allows you to configure the width of the context menu that opens on a Script Canvas graph")
+ ->Attribute(AZ::Edit::Attributes::Min, 120)
;
editContext->Class("Experimental", "Settings for features under development that may not behave as expected yet.")
diff --git a/Gems/ScriptCanvas/Code/Editor/Settings.h b/Gems/ScriptCanvas/Code/Editor/Settings.h
index eefb7454c3..dee55f8272 100644
--- a/Gems/ScriptCanvas/Code/Editor/Settings.h
+++ b/Gems/ScriptCanvas/Code/Editor/Settings.h
@@ -357,6 +357,8 @@ namespace ScriptCanvasEditor
AZ::u32 m_alignmentTimeMS;
StylingSettings m_stylingSettings;
+
+ AZ::u32 m_sceneContextMenuNodePaletteWidth = 300;
};
}
}
diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.cpp
index e4a95d7d19..6402a24b3a 100644
--- a/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.cpp
+++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.cpp
@@ -12,6 +12,8 @@
#include
#include
+#include
+
#include
#include
@@ -41,6 +43,8 @@
#include
#include "ScriptCanvasContextMenus.h"
+#include "Settings.h"
+
#include
#include
#include
@@ -53,6 +57,7 @@
#include
#include
+
namespace ScriptCanvasEditor
{
////////////////////////////
@@ -805,6 +810,13 @@ namespace ScriptCanvasEditor
SceneContextMenu::SceneContextMenu(const NodePaletteModel& paletteModel, AzToolsFramework::AssetBrowser::AssetBrowserFilterModel* assetModel)
: GraphCanvas::SceneContextMenu(ScriptCanvasEditor::AssetEditorId)
{
+
+ auto userSettings = AZ::UserSettings::CreateFind(AZ_CRC("ScriptCanvasPreviewSettings", 0x1c5a2965), AZ::UserSettings::CT_LOCAL);
+ if (userSettings)
+ {
+ m_userNodePaletteWidth = userSettings->m_sceneContextMenuNodePaletteWidth;
+ }
+
const bool inContextMenu = true;
Widget::ScriptCanvasNodePaletteConfig paletteConfig(paletteModel, assetModel, inContextMenu);
AddNodePaletteMenuAction(paletteConfig);
diff --git a/Tools/LyTestTools/ly_test_tools/environment/process_utils.py b/Tools/LyTestTools/ly_test_tools/environment/process_utils.py
index f8245495fa..44288203da 100755
--- a/Tools/LyTestTools/ly_test_tools/environment/process_utils.py
+++ b/Tools/LyTestTools/ly_test_tools/environment/process_utils.py
@@ -20,6 +20,7 @@ _PROCESS_OUTPUT_ENCODING = 'utf-8'
# Default list of processes names to kill
LY_PROCESS_KILL_LIST = [
+ 'AssetBuilder', 'AssetProcessor', 'AssetProcessorBatch',
'CrySCompileServer', 'Editor',
'Profiler', 'RemoteConsole',
'rc' # Resource Compiler
@@ -376,18 +377,18 @@ def _safe_kill_processes(processes):
logger.info(f"Terminating process '{proc.name()}' with id '{proc.pid}'")
proc.kill()
except psutil.AccessDenied:
- logger.warning("Termination failed, Access Denied", exc_info=True)
+ logger.warning("Termination failed, Access Denied with stacktrace:", exc_info=True)
except psutil.NoSuchProcess:
- logger.debug("Termination request ignored, process was already terminated during iteration", exc_info=True)
+ logger.debug("Termination request ignored, process was already terminated during iteration with stacktrace:", exc_info=True)
except Exception: # purposefully broad
- logger.warning("Unexpected exception ignored while terminating process", exc_info=True)
+ logger.debug("Unexpected exception ignored while terminating process, with stacktrace:", exc_info=True)
def on_terminate(proc):
logger.info(f"process '{proc.name()}' with id '{proc.pid}' terminated with exit code {proc.returncode}")
try:
psutil.wait_procs(processes, timeout=30, callback=on_terminate)
except Exception: # purposefully broad
- logger.warning("Unexpected exception while waiting for processes to terminate", exc_info=True)
+ logger.debug("Unexpected exception while waiting for processes to terminate, with stacktrace:", exc_info=True)
def _terminate_and_confirm_dead(proc):
diff --git a/Tools/LyTestTools/tests/unit/test_editor_test_utils.py b/Tools/LyTestTools/tests/unit/test_editor_test_utils.py
index 9a52758067..cd361d9e8a 100644
--- a/Tools/LyTestTools/tests/unit/test_editor_test_utils.py
+++ b/Tools/LyTestTools/tests/unit/test_editor_test_utils.py
@@ -74,9 +74,9 @@ class TestEditorTestUtils(unittest.TestCase):
def test_RetrieveCrashOutput_CrashLogNotExists_ReturnsError(self, mock_retrieve_log_path):
mock_retrieve_log_path.return_value = 'mock_log_path'
mock_workspace = mock.MagicMock()
- expected = "-- No crash log available --\n[Errno 2] No such file or directory: 'mock_log_path\\\\error.log'"
+ error_message = "No crash log available"
- assert expected == editor_test_utils.retrieve_crash_output(0, mock_workspace, 0)
+ assert error_message in editor_test_utils.retrieve_crash_output(0, mock_workspace, 0)
@mock.patch('os.path.getmtime', mock.MagicMock())
@mock.patch('os.rename')
diff --git a/Tools/LyTestTools/tests/unit/test_process_utils.py b/Tools/LyTestTools/tests/unit/test_process_utils.py
index bd6a79fb09..87b5790b78 100755
--- a/Tools/LyTestTools/tests/unit/test_process_utils.py
+++ b/Tools/LyTestTools/tests/unit/test_process_utils.py
@@ -371,15 +371,15 @@ class TestProcessMatching(unittest.TestCase):
mock_log_warn.assert_called()
@mock.patch('psutil.wait_procs')
- @mock.patch('logging.Logger.warning')
- def test_SafeKillProcList_RaisesError_NoRaiseAndLogsError(self, mock_log_warn, mock_wait_procs):
+ @mock.patch('logging.Logger.debug')
+ def test_SafeKillProcList_RaisesError_NoRaiseAndLogsError(self, mock_log, mock_wait_procs):
mock_wait_procs.side_effect = psutil.PermissionError()
proc_mock = mock.MagicMock()
process_utils._safe_kill_processes(proc_mock)
mock_wait_procs.assert_called()
- mock_log_warn.assert_called()
+ mock_log.assert_called()
@mock.patch('psutil.process_iter')
@mock.patch('logging.Logger.debug')
diff --git a/cmake/Platform/Linux/PAL_linux.cmake b/cmake/Platform/Linux/PAL_linux.cmake
index e74adb287e..4941f143a6 100644
--- a/cmake/Platform/Linux/PAL_linux.cmake
+++ b/cmake/Platform/Linux/PAL_linux.cmake
@@ -23,7 +23,7 @@ ly_set(PAL_TRAIT_PROF_PIX_SUPPORTED FALSE)
# Test library support
ly_set(PAL_TRAIT_TEST_GOOGLE_TEST_SUPPORTED TRUE)
ly_set(PAL_TRAIT_TEST_GOOGLE_BENCHMARK_SUPPORTED TRUE)
-ly_set(PAL_TRAIT_TEST_LYTESTTOOLS_SUPPORTED FALSE)
+ly_set(PAL_TRAIT_TEST_LYTESTTOOLS_SUPPORTED TRUE)
ly_set(PAL_TRAIT_TEST_PYTEST_SUPPORTED TRUE)
ly_set(PAL_TRAIT_TEST_TARGET_TYPE MODULE)
diff --git a/scripts/build/Platform/Linux/build_config.json b/scripts/build/Platform/Linux/build_config.json
index 103f243aae..3ae34bf16a 100644
--- a/scripts/build/Platform/Linux/build_config.json
+++ b/scripts/build/Platform/Linux/build_config.json
@@ -83,7 +83,7 @@
"CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -DLY_PARALLEL_LINK_JOBS=4",
"CMAKE_LY_PROJECTS": "AutomatedTesting",
"CMAKE_TARGET": "all",
- "CTEST_OPTIONS": "-E Gem::EMotionFX.Editor.Tests -LE (SUITE_sandbox|SUITE_awsi) -L FRAMEWORK_googletest --no-tests=error",
+ "CTEST_OPTIONS": "-E (AutomatedTesting::Atom_TestSuite_Main|AutomatedTesting::PhysicsTests_Main|AutomatedTesting::PrefabTests|AutomatedTesting::TerrainTests_Main|Gem::EMotionFX.Editor.Tests) -L (SUITE_smoke|SUITE_main) -LE (REQUIRES_gpu) --no-tests=error",
"TEST_RESULTS": "True"
}
},
@@ -96,7 +96,7 @@
"CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -DLY_UNITY_BUILD=FALSE -DLY_PARALLEL_LINK_JOBS=4",
"CMAKE_LY_PROJECTS": "AutomatedTesting",
"CMAKE_TARGET": "all",
- "CTEST_OPTIONS": "-E Gem::EMotionFX.Editor.Tests -LE (SUITE_sandbox|SUITE_awsi) -L FRAMEWORK_googletest --no-tests=error",
+ "CTEST_OPTIONS": "-E (AutomatedTesting::Atom_TestSuite_Main|AutomatedTesting::PhysicsTests_Main|AutomatedTesting::PrefabTests|AutomatedTesting::TerrainTests_Main|Gem::EMotionFX.Editor.Tests) -L (SUITE_smoke|SUITE_main) -LE (REQUIRES_gpu) --no-tests=error",
"TEST_RESULTS": "True"
}
},