Skip to content

Commit 642e8e8

Browse files
fix(mac): default AltTester server port for Unity 6 builds
MacBuilderUnity6 only set AltServerPort when ALTSERVER_PORT is provided. In CI we don't set it, which can prevent the AltTester server from listening on the expected port (13000) and causes macOS UI tests to fail to connect.
1 parent 48304d4 commit 642e8e8

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

sample/Assets/Editor/MacBuilderUnity6.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@ private static void SetupAltTester(string[] scenes)
159159
{
160160
instrumentationSettings.AltServerPort = int.Parse(port);
161161
}
162+
else
163+
{
164+
// Keep parity with Unity 2021 builder + Windows Unity 6 builder.
165+
// CI does not set ALTSERVER_PORT, and without a default the AltTester server
166+
// may not start on the expected port (13000).
167+
instrumentationSettings.AltServerPort = 13000;
168+
}
162169

163170
instrumentationSettings.ResetConnectionData = true;
164171
AltBuilder.InsertAltInScene(scenes[0], instrumentationSettings);

0 commit comments

Comments
 (0)