diff --git a/Assets/MagnetismHeroes/Tests/PlayMode/VisualUpgradePlayTests.cs b/Assets/MagnetismHeroes/Tests/PlayMode/VisualUpgradePlayTests.cs index b18c7e4..bcdda89 100644 --- a/Assets/MagnetismHeroes/Tests/PlayMode/VisualUpgradePlayTests.cs +++ b/Assets/MagnetismHeroes/Tests/PlayMode/VisualUpgradePlayTests.cs @@ -258,17 +258,20 @@ namespace MagnetismHeroes.Tests } [UnityTest] public IEnumerator TenSingleGroupsAndOneTenBallGroupRenderActualImportedResourceCounts() { - _app.StartStage(21); _app.Voice.Clear(); yield return null; var balls = Enumerable.Range(0, 10).Select(index => new BallState { id = "render-" + index, position = new Position3((index % 5 - 2) * 1.6f, .8f + index / 5 * 1.8f, 0) }).ToArray(); - foreach (bool singles in new[] { true, false }) + foreach (int stage in new[] { 1, 11, 21 }) { - var groups = singles ? balls.Select(ball => new GroupState { id = ball.id, ballIds = new[] { ball.id } }).ToArray() - : new[] { new GroupState { id = "ten", ballIds = balls.Select(ball => ball.id).ToArray() } }; - var board = BoardRules.CreateFreePlay(new FreePlayState { sourceStageId = 21, balls = balls, groups = groups }); - _app.Presenter.Render(board); yield return null; - AssertEquipmentFollowsRepresentatives(board); - CaptureViews(singles ? "ten-single-groups" : "ten-one-group", "Validated synthetic Core FreePlay render fixture; session UI remains stage 21"); + _app.StartStage(stage); _app.Voice.Clear(); yield return null; + foreach (bool singles in new[] { true, false }) + { + var groups = singles ? balls.Select(ball => new GroupState { id = ball.id, ballIds = new[] { ball.id } }).ToArray() + : new[] { new GroupState { id = "ten", ballIds = balls.Select(ball => ball.id).ToArray() } }; + var board = BoardRules.CreateFreePlay(new FreePlayState { sourceStageId = stage, balls = balls, groups = groups }); + _app.Presenter.Render(board); yield return null; + AssertEquipmentFollowsRepresentatives(board); + CaptureViews("world" + stage + (singles ? "-ten-single-groups" : "-ten-one-group"), "Validated synthetic Core FreePlay render fixture; session UI remains underlying stage " + stage); + } } } private void Capture(string name, string origin, int width = 1280, int height = 720) @@ -300,7 +303,7 @@ namespace MagnetismHeroes.Tests allocatedMemory = Profiler.GetTotalAllocatedMemoryLong(), cameraPosition = camera.transform.position, cameraRotation = camera.transform.rotation, method = "Actual Main scene PlayMode Camera.Render to RT, ScreenSpaceCamera canvas; simulated viewport, not Android capture. Triangles are resident mesh-instance index counts, including inactive retained scene objects; Camera.Render elapsed is Editor CPU wall time, not GPU time or device FPS. Texture memory includes all Editor-loaded textures." }; File.WriteAllText(Path.Combine(_evidence, name + ".json"), JsonUtility.ToJson(record, true)); - if (name == "ten-single-groups-phone-default") + if (name == "world21-ten-single-groups-phone-default") File.WriteAllLines(Path.Combine(_evidence, "editor-loaded-textures.txt"), Resources.FindObjectsOfTypeAll() .Select(item => $"{AssetDatabase.GetAssetPath(item)};name={item.name};dimensions={item.width}x{item.height};format={(item is Texture2D texture ? texture.format.ToString() : item.GetType().Name)};runtimeBytes={Profiler.GetRuntimeMemorySizeLong(item)}")); }