2
0
Эх сурвалжийг харах

Fixing Lua Spawnables Tests on Linux (#9908)

* Updating Vector3s in test Lua scripts with floats and removing test xfails

Signed-off-by: jckand-amzn <[email protected]>

* Adding additional wait_for_conditions to validate_spawned_entity_tranform helper

Signed-off-by: jckand-amzn <[email protected]>

* Exposing GetWorldUniformScale to Python automation and adding helper to editor_entity_utils

Signed-off-by: jckand-amzn <[email protected]>

* Adding additional transform verification helpers and updating expected values for world scale in nested tests

Signed-off-by: jckand-amzn <[email protected]>

* Increasing delay for despawn of spawnables to allow for transform verification

Signed-off-by: jckand-amzn <[email protected]>

* Increasing timeout for wait on script to exit Game Mode

Signed-off-by: jckand-amzn <[email protected]>
jckand-amzn 3 жил өмнө
parent
commit
18cf620eb9

+ 6 - 0
AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/editor_entity_utils.py

@@ -658,6 +658,12 @@ class EditorEntity:
         new_rotation = convert_to_azvector3(new_rotation)
         azlmbr.components.TransformBus(azlmbr.bus.Event, "SetWorldRotation", self.id, new_rotation)
 
+    def get_world_uniform_scale(self) -> float:
+        """
+        Gets the world uniform scale of the current entity
+        """
+        return azlmbr.components.TransformBus(azlmbr.bus.Event, "GetWorldUniformScale", self.id)
+
     # Local Transform Functions
     def get_local_uniform_scale(self) -> float:
         """

+ 1 - 11
AutomatedTesting/Gem/PythonTests/Prefab/TestSuite_Main_Optimized.py

@@ -66,42 +66,32 @@ class TestAutomationNoAutoTestMode(EditorTestSuite):
     class test_DuplicatePrefab_ContainingASingleEntity(EditorSharedTest):
         from .tests.duplicate_prefab import DuplicatePrefab_ContainingASingleEntity as test_module
 
-    @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/9789")
     class test_SC_Spawnables_SimpleSpawnAndDespawn(EditorSharedTest):
         from .tests.spawnables import SC_Spawnables_SimpleSpawnAndDespawn as test_module
 
-    @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/9789")
     class test_SC_Spawnables_EntityClearedOnGameModeExit(EditorSharedTest):
         from .tests.spawnables import SC_Spawnables_EntityClearedOnGameModeExit as test_module
 
-    @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/9789")
     class test_SC_Spawnables_MultipleSpawnsFromSingleTicket(EditorSharedTest):
         from .tests.spawnables import SC_Spawnables_MultipleSpawnsFromSingleTicket as test_module
 
-    @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/9789")
     class test_SC_Spawnables_NestedSpawn(EditorSharedTest):
         from .tests.spawnables import SC_Spawnables_NestedSpawn as test_module
 
-    @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/9789")
     class test_SC_Spawnables_DespawnOnEntityDeactivate(EditorSharedTest):
         from .tests.spawnables import SC_Spawnables_DespawnOnEntityDeactivate as test_module
 
-    @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/9789")
     class test_Lua_Spawnables_SimpleSpawnAndDespawn(EditorSharedTest):
         from .tests.spawnables import Lua_Spawnables_SimpleSpawnAndDespawn as test_module
 
-    @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/9789")
     class test_Lua_Spawnables_EntityClearedOnGameModeExit(EditorSharedTest):
         from .tests.spawnables import Lua_Spawnables_EntityClearedOnGameModeExit as test_module
 
-    @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/9789")
     class test_Lua_Spawnables_MultipleSpawnsFromSingleTicket(EditorSharedTest):
         from .tests.spawnables import Lua_Spawnables_MultipleSpawnsFromSingleTicket as test_module
 
-    @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/9789")
     class test_Lua_Spawnables_NestedSpawn(EditorSharedTest):
         from .tests.spawnables import Lua_Spawnables_NestedSpawn as test_module
 
-    @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/9789")
     class test_Lua_Spawnables_DespawnOnEntityDeactivate(EditorSharedTest):
-        from .tests.spawnables import Lua_Spawnables_DespawnOnEntityDeactivate as test_module
+        from .tests.spawnables import Lua_Spawnables_DespawnOnEntityDeactivate as test_module

+ 55 - 13
AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabTestUtils.py

@@ -240,29 +240,71 @@ def validate_undo_redo_on_prefab_creation(prefab_instance, original_parent_id):
             "Prefab parent was not restored on Redo."
 
 
-def validate_spawned_entity_transform(entity, expected_position, expected_rotation, expected_scale):
+def validate_spawned_entity_rotation(entity, expected_rotation):
     """
-    This is a helper function which helps validate the transform of entities spawned via the spawnable API
+    This is a helper function which helps validate the rotation of entities spawned via the spawnable API
     :param entity: The spawned entity on which to validate transform values
-    :param expected_position: The expected world position of the spawned entity
     :param expected_rotation: The expected world rotation of the spawned entity
-    :param expected_scale: The expected local scale of the spawned entity
     """
-    spawned_entity_transform = entity.get_world_translation()
     spawned_entity_rotation = entity.get_world_rotation()
-
     x_rotation_success = math.isclose(spawned_entity_rotation.x, expected_rotation.x,
                                       rel_tol=1e-5)
     y_rotation_success = math.isclose(spawned_entity_rotation.y, expected_rotation.y,
                                       rel_tol=1e-5)
     z_rotation_success = math.isclose(spawned_entity_rotation.z, expected_rotation.z,
                                       rel_tol=1e-5)
-    rotation_success = x_rotation_success and y_rotation_success and z_rotation_success
-    spawned_entity_scale_success = wait_for_condition(lambda: entity.get_local_uniform_scale() == expected_scale, 3.0)
+    Report.info(f"Spawned Entity Rotation: Found {spawned_entity_rotation}, expected {expected_rotation}")
+    return x_rotation_success and y_rotation_success and z_rotation_success
+
+
+def validate_spawned_entity_scale(entity, expected_scale):
+    """
+    This is a helper function which helps validate the scale of entities spawned via the spawnable API
+    :param entity: The spawned entity on which to validate transform values
+    :param expected_scale: The expected world scale of the spawned entity
+    """
+    spawned_entity_scale = entity.get_world_uniform_scale()
+    scale_success = spawned_entity_scale == expected_scale
+    Report.info(f"Spawned Entity Scale: Found {spawned_entity_scale}, expected {expected_scale}")
+    return scale_success
+
 
-    assert spawned_entity_transform == expected_position, \
-        f"Entity was not spawned in the position expected: Found {spawned_entity_transform}, expected {expected_position}"
+def validate_spawned_entity_translation(entity, expected_position):
+    """
+    This is a helper function which helps validate the world position of entities spawned via the spawnable API
+    :param entity: The spawned entity on which to validate transform values
+    :param expected_position: The expected world translation of the spawned entity
+    """
+    spawned_entity_position = entity.get_world_translation()
+    position_success = spawned_entity_position == expected_position
+    Report.info(f"Spawned Entity Translation: Found {spawned_entity_position}, expected {expected_position}")
+    return position_success
+
+
+def validate_spawned_entity_transform(entity, expected_position, expected_rotation, expected_scale):
+    """
+    This is a helper function which helps validate the transform of entities spawned via the spawnable API
+    :param entity: The spawned entity on which to validate transform values
+    :param expected_position: The expected world position of the spawned entity
+    :param expected_rotation: The expected world rotation of the spawned entity
+    :param expected_scale: The expected local scale of the spawned entity
+    """
+
+    position_success = helper.wait_for_condition(lambda: validate_spawned_entity_translation(entity, expected_position),
+                                                 5.0)
+    rotation_success = helper.wait_for_condition(lambda: validate_spawned_entity_rotation(entity, expected_rotation),
+                                                 5.0)
+    scale_success = helper.wait_for_condition(lambda: validate_spawned_entity_scale(entity, expected_scale),
+                                              5.0)
+
+    assert position_success, \
+        f"Entity was not spawned in the position expected: Found {entity.get_world_translation()}, " \
+        f"expected {expected_position}"
     assert rotation_success, \
-        f"Entity was not spawned with the rotation expected: Found {spawned_entity_rotation}, expected {expected_rotation}"
-    assert spawned_entity_scale_success, \
-        f"Entity was not spawned with the scale expected: Found {entity.get_local_uniform_scale()}, expected {expected_scale}"
+        f"Entity was not spawned with the rotation expected: Found {entity.get_world_rotation()}, " \
+        f"expected {expected_rotation}"
+    assert scale_success, \
+        f"Entity was not spawned with the scale expected: Found {entity.get_world_uniform_scale()}, " \
+        f"expected {expected_scale}"
+
+    return position_success and rotation_success and scale_success

+ 1 - 1
AutomatedTesting/Gem/PythonTests/Prefab/tests/spawnables/Lua_Spawnables_NestedSpawn.py

@@ -59,7 +59,7 @@ def Lua_Spawnables_NestedSpawn():
     # Verify flower entity is spawned by nested spawner with the correct position, rotation, and scale values
     expected_spawned_entity_position = azmath.Vector3(5.0, 0.0, 0.0)
     expected_spawned_entity_rotation = azmath.Vector3(0.0, 0.0, math.radians(90.0))
-    expected_spawned_entity_scale = 1.0
+    expected_spawned_entity_scale = 5.0
     validate_spawned_entity_transform(flower_entity, expected_spawned_entity_position, expected_spawned_entity_rotation,
                                       expected_spawned_entity_scale)
 

+ 1 - 1
AutomatedTesting/Gem/PythonTests/Prefab/tests/spawnables/Lua_Spawnables_SimpleSpawnAndDespawn.py

@@ -51,7 +51,7 @@ def Lua_Spawnables_SimpleSpawnAndDespawn():
                                       expected_spawned_entity_scale)
 
     # Wait for Lua script to exit Game Mode on despawn of PinkFlower.spawnable and search for expected entities
-    game_mode_exited = helper.wait_for_condition(lambda: not general.is_in_game_mode(), 5.0)
+    game_mode_exited = helper.wait_for_condition(lambda: not general.is_in_game_mode(), 10.0)
     assert game_mode_exited, "Lua script failed to exit Game Mode"
     validate_entities_in_edit_mode("after exiting Game Mode")
 

+ 1 - 1
AutomatedTesting/Gem/PythonTests/Prefab/tests/spawnables/SC_Spawnables_NestedSpawn.py

@@ -59,7 +59,7 @@ def SC_Spawnables_NestedSpawn():
     # Verify flower entity is spawned by nested spawner with the correct position, rotation, and scale values
     expected_spawned_entity_position = azmath.Vector3(5.0, 0.0, 0.0)
     expected_spawned_entity_rotation = azmath.Vector3(0.0, 0.0, math.radians(90.0))
-    expected_spawned_entity_scale = 1.0
+    expected_spawned_entity_scale = 5.0
     validate_spawned_entity_transform(flower_entity, expected_spawned_entity_position, expected_spawned_entity_rotation,
                                       expected_spawned_entity_scale)
 

+ 1 - 1
AutomatedTesting/Gem/PythonTests/Prefab/tests/spawnables/SC_Spawnables_SimpleSpawnAndDespawn.py

@@ -51,7 +51,7 @@ def SC_Spawnables_SimpleSpawnAndDespawn():
                                       expected_spawned_entity_scale)
 
     # Wait for SC graph to exit Game Mode on despawn of PinkFlower.spawnable and search for expected entities
-    game_mode_exited = helper.wait_for_condition(lambda: not general.is_in_game_mode(), 5.0)
+    game_mode_exited = helper.wait_for_condition(lambda: not general.is_in_game_mode(), 10.0)
     assert game_mode_exited, "SC graph failed to exit Game Mode"
     validate_entities_in_edit_mode("after exiting Game Mode")
 

+ 1 - 1
AutomatedTesting/Levels/Prefab/Lua_Spawnables_SimpleSpawnDespawn/Lua_Spawnables_SimpleSpawnDespawn.prefab

@@ -393,7 +393,7 @@
                                     "$type": "AzFramework::ScriptPropertyNumber",
                                     "id": 2316173759,
                                     "name": "DespawnTime",
-                                    "value": 3.0
+                                    "value": 5.0
                                 },
                                 {
                                     "$type": "AzFramework::ScriptPropertyGenericClass",

+ 3 - 3
AutomatedTesting/LuaScripts/Spawnables/MultipleSpawnsFromSingleTicket.lua

@@ -15,14 +15,14 @@ local MultipleSpawnsFromSingleTicket =
     {
         Prefab = { default=SpawnableScriptAssetRef(), description="Prefab to spawn" },
         SpawnCount = { default=3, description="How many prefabs to spawn" },
-        Offset = { default=Vector3(0, 2, 0), description="Translation offset for each spawn" }
+        Offset = { default=Vector3(0.0, 2.0, 0.0), description="Translation offset for each spawn" }
     },
 }
 
 function MultipleSpawnsFromSingleTicket:OnActivate()
     self.entityCount = 0
     self.spawnsRemaining = self.Properties.SpawnCount
-    self.translation = Vector3(0, 0, 0)
+    self.translation = Vector3(0.0, 0.0, 0.0)
     self.spawnableMediator = SpawnableScriptMediator()
     self.ticket = self.spawnableMediator:CreateSpawnTicket(self.Properties.Prefab)
     self.spawnableNotificationsBusHandler = SpawnableScriptNotificationsBus.Connect(self, self.ticket:GetId())
@@ -46,7 +46,7 @@ end
 function MultipleSpawnsFromSingleTicket:Spawn()
     self.spawnsRemaining = self.spawnsRemaining - 1
     self.translation = self.translation + self.Properties.Offset
-    self.spawnableMediator:SpawnAndParentAndTransform(self.ticket, self.entityId, self.translation, Vector3(0,0,0), 1.0 )
+    self.spawnableMediator:SpawnAndParentAndTransform(self.ticket, self.entityId, self.translation, Vector3(0.0, 0.0, 0.0), 1.0 )
 end
 
 return MultipleSpawnsFromSingleTicket

+ 3 - 3
AutomatedTesting/LuaScripts/Spawnables/NestedSpawner.lua

@@ -14,9 +14,9 @@ local NestedSpawner =
     Properties = 
     {
         Prefab = { default=SpawnableScriptAssetRef(), description="Prefab to spawn" },
-        Translation = { default=Vector3(0, 0, 0) },
-        Rotation = { default=Vector3(0, 0, 0) },
-        Scale = { default=1 }
+        Translation = { default=Vector3(0.0, 0.0, 0.0) },
+        Rotation = { default=Vector3(0.0, 0.0, 0.0) },
+        Scale = { default=1.0 }
     },
 }
 

+ 1 - 1
AutomatedTesting/LuaScripts/Spawnables/SimpleSpawnDespawn.lua

@@ -21,7 +21,7 @@ local SimpleSpawnDespawn =
 function SimpleSpawnDespawn:OnActivate()
     self.spawnableMediator = SpawnableScriptMediator()
     self.ticket = self.spawnableMediator:CreateSpawnTicket(self.Properties.Prefab)
-    self.spawnableMediator:SpawnAndParentAndTransform(self.ticket, self.entityId, Vector3(0,0,5), Vector3(0,0,90), 5.0 )
+    self.spawnableMediator:SpawnAndParentAndTransform(self.ticket, self.entityId, Vector3(0.0,0.0,5.0), Vector3(0.0,0.0,90.0), 5.0 )
     self.spawnableNotificationsBusHandler = SpawnableScriptNotificationsBus.Connect(self, self.ticket:GetId())
 end
 

+ 70 - 70
AutomatedTesting/ScriptCanvas/Spawnables/SimpleSpawnDespawn.scriptcanvas

@@ -5,7 +5,7 @@
     "ClassData": {
         "m_scriptCanvas": {
             "Id": {
-                "id": 692269452633
+                "id": 1084471800062
             },
             "Name": "Script Canvas Graph",
             "Components": {
@@ -16,7 +16,7 @@
                         "m_nodes": [
                             {
                                 "Id": {
-                                    "id": 722334223705
+                                    "id": 1114536571134
                                 },
                                 "Name": "SC-Node(Print)",
                                 "Components": {
@@ -116,7 +116,7 @@
                             },
                             {
                                 "Id": {
-                                    "id": 718039256409
+                                    "id": 1110241603838
                                 },
                                 "Name": "SC-Node(SpawnNodeableNode)",
                                 "Components": {
@@ -466,7 +466,7 @@
                             },
                             {
                                 "Id": {
-                                    "id": 713744289113
+                                    "id": 1105946636542
                                 },
                                 "Name": "SC-Node(ForEach)",
                                 "Components": {
@@ -613,7 +613,7 @@
                             },
                             {
                                 "Id": {
-                                    "id": 709449321817
+                                    "id": 1101651669246
                                 },
                                 "Name": "SC-Node(ExecuteConsoleCommand)",
                                 "Components": {
@@ -696,7 +696,7 @@
                             },
                             {
                                 "Id": {
-                                    "id": 705154354521
+                                    "id": 1097356701950
                                 },
                                 "Name": "SC-Node(DespawnNodeableNode)",
                                 "Components": {
@@ -867,7 +867,7 @@
                             },
                             {
                                 "Id": {
-                                    "id": 726629191001
+                                    "id": 1093061734654
                                 },
                                 "Name": "EBusEventHandler",
                                 "Components": {
@@ -1107,7 +1107,7 @@
                             },
                             {
                                 "Id": {
-                                    "id": 700859387225
+                                    "id": 1088766767358
                                 },
                                 "Name": "SC-Node(CreateSpawnTicketNodeableNode)",
                                 "Components": {
@@ -1252,7 +1252,7 @@
                             },
                             {
                                 "Id": {
-                                    "id": 696564419929
+                                    "id": 1118831538430
                                 },
                                 "Name": "SC-Node(TimeDelayNodeableNode)",
                                 "Components": {
@@ -1344,7 +1344,7 @@
                                                 },
                                                 "isNullPointer": false,
                                                 "$type": "double",
-                                                "value": 3.0,
+                                                "value": 5.0,
                                                 "label": "Delay"
                                             }
                                         ],
@@ -1393,7 +1393,7 @@
                         "m_connections": [
                             {
                                 "Id": {
-                                    "id": 730924158297
+                                    "id": 1123126505726
                                 },
                                 "Name": "srcEndpoint=(EntityBus Handler: ExecutionSlot:OnEntityActivated), destEndpoint=(CreateSpawnTicket: Create Ticket)",
                                 "Components": {
@@ -1402,7 +1402,7 @@
                                         "Id": 11806241843643702361,
                                         "sourceEndpoint": {
                                             "nodeId": {
-                                                "id": 726629191001
+                                                "id": 1093061734654
                                             },
                                             "slotId": {
                                                 "m_id": "{D48E61D1-76D7-459E-975D-9990EEFE01F5}"
@@ -1410,7 +1410,7 @@
                                         },
                                         "targetEndpoint": {
                                             "nodeId": {
-                                                "id": 700859387225
+                                                "id": 1088766767358
                                             },
                                             "slotId": {
                                                 "m_id": "{5003E8F4-CAD5-45D8-9D35-82F5EC005597}"
@@ -1421,7 +1421,7 @@
                             },
                             {
                                 "Id": {
-                                    "id": 735219125593
+                                    "id": 1127421473022
                                 },
                                 "Name": "srcEndpoint=(CreateSpawnTicket: Ticket Created), destEndpoint=(Spawn: Request Spawn)",
                                 "Components": {
@@ -1430,7 +1430,7 @@
                                         "Id": 1190229686589053463,
                                         "sourceEndpoint": {
                                             "nodeId": {
-                                                "id": 700859387225
+                                                "id": 1088766767358
                                             },
                                             "slotId": {
                                                 "m_id": "{862A98D1-A7B3-4028-B1F0-B451B04D1EE2}"
@@ -1438,7 +1438,7 @@
                                         },
                                         "targetEndpoint": {
                                             "nodeId": {
-                                                "id": 718039256409
+                                                "id": 1110241603838
                                             },
                                             "slotId": {
                                                 "m_id": "{DF4F8C87-A4EA-476F-8954-A579C63B7840}"
@@ -1449,7 +1449,7 @@
                             },
                             {
                                 "Id": {
-                                    "id": 739514092889
+                                    "id": 1131716440318
                                 },
                                 "Name": "srcEndpoint=(Spawn: On Spawn Completed), destEndpoint=(TimeDelay: Start)",
                                 "Components": {
@@ -1458,7 +1458,7 @@
                                         "Id": 2775409380970549039,
                                         "sourceEndpoint": {
                                             "nodeId": {
-                                                "id": 718039256409
+                                                "id": 1110241603838
                                             },
                                             "slotId": {
                                                 "m_id": "{AB9CDE2E-441E-43BD-B6F4-FE4DC6DEF4E8}"
@@ -1466,7 +1466,7 @@
                                         },
                                         "targetEndpoint": {
                                             "nodeId": {
-                                                "id": 696564419929
+                                                "id": 1118831538430
                                             },
                                             "slotId": {
                                                 "m_id": "{1227B6FD-8C12-4840-BCF5-35247D307FD9}"
@@ -1477,7 +1477,7 @@
                             },
                             {
                                 "Id": {
-                                    "id": 743809060185
+                                    "id": 1136011407614
                                 },
                                 "Name": "srcEndpoint=(TimeDelay: Done), destEndpoint=(Despawn: Request Despawn)",
                                 "Components": {
@@ -1486,7 +1486,7 @@
                                         "Id": 13355573752654945065,
                                         "sourceEndpoint": {
                                             "nodeId": {
-                                                "id": 696564419929
+                                                "id": 1118831538430
                                             },
                                             "slotId": {
                                                 "m_id": "{72D7CB1E-7A5E-439E-B6D0-664FBD32466A}"
@@ -1494,7 +1494,7 @@
                                         },
                                         "targetEndpoint": {
                                             "nodeId": {
-                                                "id": 705154354521
+                                                "id": 1097356701950
                                             },
                                             "slotId": {
                                                 "m_id": "{DDA62F14-80EA-4607-AE9E-C972B56F4A9C}"
@@ -1505,7 +1505,7 @@
                             },
                             {
                                 "Id": {
-                                    "id": 748104027481
+                                    "id": 1140306374910
                                 },
                                 "Name": "srcEndpoint=(Despawn: On Despawn), destEndpoint=(ExecuteConsoleCommand: In)",
                                 "Components": {
@@ -1514,7 +1514,7 @@
                                         "Id": 10288172960433720049,
                                         "sourceEndpoint": {
                                             "nodeId": {
-                                                "id": 705154354521
+                                                "id": 1097356701950
                                             },
                                             "slotId": {
                                                 "m_id": "{EAE30811-4A8F-4DF6-B18A-5E6116D378C2}"
@@ -1522,7 +1522,7 @@
                                         },
                                         "targetEndpoint": {
                                             "nodeId": {
-                                                "id": 709449321817
+                                                "id": 1101651669246
                                             },
                                             "slotId": {
                                                 "m_id": "{AC97F8C3-BB55-45CB-BD7B-2AE9248B3616}"
@@ -1533,7 +1533,7 @@
                             },
                             {
                                 "Id": {
-                                    "id": 752398994777
+                                    "id": 1144601342206
                                 },
                                 "Name": "srcEndpoint=(Spawn: SpawnedEntitiesList), destEndpoint=(For Each: Source)",
                                 "Components": {
@@ -1542,7 +1542,7 @@
                                         "Id": 10670766653227405525,
                                         "sourceEndpoint": {
                                             "nodeId": {
-                                                "id": 718039256409
+                                                "id": 1110241603838
                                             },
                                             "slotId": {
                                                 "m_id": "{06EFCDB6-E45F-40EB-81FE-084F08458166}"
@@ -1550,7 +1550,7 @@
                                         },
                                         "targetEndpoint": {
                                             "nodeId": {
-                                                "id": 713744289113
+                                                "id": 1105946636542
                                             },
                                             "slotId": {
                                                 "m_id": "{0C6793EC-A9C2-4D03-AFFB-E116B64F90A2}"
@@ -1561,7 +1561,7 @@
                             },
                             {
                                 "Id": {
-                                    "id": 756693962073
+                                    "id": 1148896309502
                                 },
                                 "Name": "srcEndpoint=(For Each: EntityId), destEndpoint=(Print: Value)",
                                 "Components": {
@@ -1570,7 +1570,7 @@
                                         "Id": 17861921791009812009,
                                         "sourceEndpoint": {
                                             "nodeId": {
-                                                "id": 713744289113
+                                                "id": 1105946636542
                                             },
                                             "slotId": {
                                                 "m_id": "{11069609-0EDB-4414-88D0-B159670A587E}"
@@ -1578,7 +1578,7 @@
                                         },
                                         "targetEndpoint": {
                                             "nodeId": {
-                                                "id": 722334223705
+                                                "id": 1114536571134
                                             },
                                             "slotId": {
                                                 "m_id": "{A0CEBF36-3D5D-48FA-ADF1-0074F3A51094}"
@@ -1589,7 +1589,7 @@
                             },
                             {
                                 "Id": {
-                                    "id": 760988929369
+                                    "id": 1153191276798
                                 },
                                 "Name": "srcEndpoint=(For Each: Each), destEndpoint=(Print: In)",
                                 "Components": {
@@ -1598,7 +1598,7 @@
                                         "Id": 12259531219439505941,
                                         "sourceEndpoint": {
                                             "nodeId": {
-                                                "id": 713744289113
+                                                "id": 1105946636542
                                             },
                                             "slotId": {
                                                 "m_id": "{1B9F8757-86B9-4459-85E9-1A935AC72655}"
@@ -1606,7 +1606,7 @@
                                         },
                                         "targetEndpoint": {
                                             "nodeId": {
-                                                "id": 722334223705
+                                                "id": 1114536571134
                                             },
                                             "slotId": {
                                                 "m_id": "{88DA8FC0-5EDB-4908-8B00-CE6AEFDD8C54}"
@@ -1617,7 +1617,7 @@
                             },
                             {
                                 "Id": {
-                                    "id": 765283896665
+                                    "id": 1157486244094
                                 },
                                 "Name": "srcEndpoint=(Spawn: On Spawn Completed), destEndpoint=(For Each: In)",
                                 "Components": {
@@ -1626,7 +1626,7 @@
                                         "Id": 17906405945706962515,
                                         "sourceEndpoint": {
                                             "nodeId": {
-                                                "id": 718039256409
+                                                "id": 1110241603838
                                             },
                                             "slotId": {
                                                 "m_id": "{AB9CDE2E-441E-43BD-B6F4-FE4DC6DEF4E8}"
@@ -1634,7 +1634,7 @@
                                         },
                                         "targetEndpoint": {
                                             "nodeId": {
-                                                "id": 713744289113
+                                                "id": 1105946636542
                                             },
                                             "slotId": {
                                                 "m_id": "{F539A649-4B9A-4AC9-B199-F323E46D9D92}"
@@ -1655,16 +1655,16 @@
                     "GraphCanvasData": [
                         {
                             "Key": {
-                                "id": 692269452633
+                                "id": 1084471800062
                             },
                             "Value": {
                                 "ComponentData": {
                                     "{5F84B500-8C45-40D1-8EFC-A5306B241444}": {
                                         "$type": "SceneComponentSaveData",
                                         "ViewParams": {
-                                            "Scale": 1.1802649523195985,
-                                            "AnchorX": 812.5294189453125,
-                                            "AnchorY": 294.00177001953125
+                                            "Scale": 1.0032252094716587,
+                                            "AnchorX": 709.7110595703125,
+                                            "AnchorY": 198.36024475097656
                                         }
                                     }
                                 }
@@ -1672,7 +1672,7 @@
                         },
                         {
                             "Key": {
-                                "id": 696564419929
+                                "id": 1088766767358
                             },
                             "Value": {
                                 "ComponentData": {
@@ -1686,8 +1686,8 @@
                                     "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": {
                                         "$type": "GeometrySaveData",
                                         "Position": [
-                                            1680.0,
-                                            420.0
+                                            520.0,
+                                            500.0
                                         ]
                                     },
                                     "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": {
@@ -1695,29 +1695,33 @@
                                     },
                                     "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": {
                                         "$type": "PersistentIdComponentSaveData",
-                                        "PersistentId": "{37470F36-195D-4E4E-83C5-41A5F68DE566}"
+                                        "PersistentId": "{2D7AB577-E45A-499D-9A74-627C1942807D}"
                                     }
                                 }
                             }
                         },
                         {
                             "Key": {
-                                "id": 700859387225
+                                "id": 1093061734654
                             },
                             "Value": {
                                 "ComponentData": {
                                     "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": {
                                         "$type": "NodeSaveData"
                                     },
-                                    "{328FF15C-C302-458F-A43D-E1794DE0904E}": {
-                                        "$type": "GeneralNodeTitleComponentSaveData",
-                                        "PaletteOverride": "DefaultNodeTitlePalette"
-                                    },
                                     "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": {
                                         "$type": "GeometrySaveData",
                                         "Position": [
-                                            520.0,
-                                            500.0
+                                            220.0,
+                                            280.0
+                                        ]
+                                    },
+                                    "{9E81C95F-89C0-4476-8E82-63CCC4E52E04}": {
+                                        "$type": "EBusHandlerNodeDescriptorSaveData",
+                                        "EventIds": [
+                                            {
+                                                "Value": 245425936
+                                            }
                                         ]
                                     },
                                     "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": {
@@ -1725,14 +1729,14 @@
                                     },
                                     "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": {
                                         "$type": "PersistentIdComponentSaveData",
-                                        "PersistentId": "{2D7AB577-E45A-499D-9A74-627C1942807D}"
+                                        "PersistentId": "{4BF69234-425A-4D55-8759-B6E4DC0A4D2F}"
                                     }
                                 }
                             }
                         },
                         {
                             "Key": {
-                                "id": 705154354521
+                                "id": 1097356701950
                             },
                             "Value": {
                                 "ComponentData": {
@@ -1762,7 +1766,7 @@
                         },
                         {
                             "Key": {
-                                "id": 709449321817
+                                "id": 1101651669246
                             },
                             "Value": {
                                 "ComponentData": {
@@ -1793,7 +1797,7 @@
                         },
                         {
                             "Key": {
-                                "id": 713744289113
+                                "id": 1105946636542
                             },
                             "Value": {
                                 "ComponentData": {
@@ -1823,7 +1827,7 @@
                         },
                         {
                             "Key": {
-                                "id": 718039256409
+                                "id": 1110241603838
                             },
                             "Value": {
                                 "ComponentData": {
@@ -1853,7 +1857,7 @@
                         },
                         {
                             "Key": {
-                                "id": 722334223705
+                                "id": 1114536571134
                             },
                             "Value": {
                                 "ComponentData": {
@@ -1883,26 +1887,22 @@
                         },
                         {
                             "Key": {
-                                "id": 726629191001
+                                "id": 1118831538430
                             },
                             "Value": {
                                 "ComponentData": {
                                     "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": {
                                         "$type": "NodeSaveData"
                                     },
+                                    "{328FF15C-C302-458F-A43D-E1794DE0904E}": {
+                                        "$type": "GeneralNodeTitleComponentSaveData",
+                                        "PaletteOverride": "DefaultNodeTitlePalette"
+                                    },
                                     "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": {
                                         "$type": "GeometrySaveData",
                                         "Position": [
-                                            220.0,
-                                            280.0
-                                        ]
-                                    },
-                                    "{9E81C95F-89C0-4476-8E82-63CCC4E52E04}": {
-                                        "$type": "EBusHandlerNodeDescriptorSaveData",
-                                        "EventIds": [
-                                            {
-                                                "Value": 245425936
-                                            }
+                                            1680.0,
+                                            420.0
                                         ]
                                     },
                                     "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": {
@@ -1910,7 +1910,7 @@
                                     },
                                     "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": {
                                         "$type": "PersistentIdComponentSaveData",
-                                        "PersistentId": "{4BF69234-425A-4D55-8759-B6E4DC0A4D2F}"
+                                        "PersistentId": "{37470F36-195D-4E4E-83C5-41A5F68DE566}"
                                     }
                                 }
                             }

+ 1 - 0
Code/Framework/AzFramework/AzFramework/Components/TransformComponent.cpp

@@ -757,6 +757,7 @@ namespace AzFramework
                 ->Event("GetAllDescendants", &AZ::TransformBus::Events::GetAllDescendants)
                 ->Event("GetEntityAndAllDescendants", &AZ::TransformBus::Events::GetEntityAndAllDescendants)
                 ->Event("IsStaticTransform", &AZ::TransformBus::Events::IsStaticTransform)
+                ->Event("GetWorldUniformScale", &AZ::TransformBus::Events::GetWorldUniformScale)
                 ;
 
             behaviorContext->Constant("TransformComponentTypeId", BehaviorConstant(AZ::TransformComponentTypeId));