Skip to content

Commit c2a7363

Browse files
authored
Merge pull request #343 from immutable/test/ios-builder-host
[DX-3432] test: ability to specify host for mobile builder
2 parents e5ec4ad + a9e1371 commit c2a7363

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

sample/Assets/Editor/MobileBuilder.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,19 @@ private static BuildTarget GetPlatformFromArgs()
7979
return BuildTarget.Android; // Default to Android if no platform is specified
8080
}
8181

82+
private static string GetAltTesterHostFromArgs()
83+
{
84+
string[] args = Environment.GetCommandLineArgs();
85+
for (int i = 0; i < args.Length; i++)
86+
{
87+
if (args[i] == "--host" && i + 1 < args.Length)
88+
{
89+
return args[i + 1];
90+
}
91+
}
92+
return null;
93+
}
94+
8295
private static BuildPlayerOptions CreateBuildPlayerOptions(string buildPath, BuildOptions buildOptions, BuildTarget platform)
8396
{
8497
return new BuildPlayerOptions
@@ -106,7 +119,7 @@ private static void SetupAltTester(BuildPlayerOptions buildPlayerOptions, BuildT
106119
AltBuilder.CreateJsonFileForInputMappingOfAxis();
107120

108121
var instrumentationSettings = new AltInstrumentationSettings();
109-
var host = System.Environment.GetEnvironmentVariable("ALTSERVER_HOST");
122+
var host = System.Environment.GetEnvironmentVariable("ALTSERVER_HOST") ?? GetAltTesterHostFromArgs();
110123
if (!string.IsNullOrEmpty(host))
111124
{
112125
instrumentationSettings.AltServerHost = host;

sample/Assets/Scenes/SelectAuthMethod.unity

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ MonoBehaviour:
206206
m_TargetGraphic: {fileID: 416242725}
207207
m_HandleRect: {fileID: 416242724}
208208
m_Direction: 0
209-
m_Value: 0
209+
m_Value: 1
210210
m_Size: 0.9999999
211211
m_NumberOfSteps: 0
212212
m_OnValueChanged:
@@ -1323,7 +1323,7 @@ MonoBehaviour:
13231323
m_TargetGraphic: {fileID: 167431872}
13241324
m_HandleRect: {fileID: 167431871}
13251325
m_Direction: 2
1326-
m_Value: 0
1326+
m_Value: 1
13271327
m_Size: 1
13281328
m_NumberOfSteps: 0
13291329
m_OnValueChanged:
@@ -1673,8 +1673,8 @@ RectTransform:
16731673
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
16741674
m_AnchorMin: {x: 0, y: 0}
16751675
m_AnchorMax: {x: 0, y: 0}
1676-
m_AnchoredPosition: {x: 1259.3727, y: 0}
1677-
m_SizeDelta: {x: 2478.7454, y: 0}
1676+
m_AnchoredPosition: {x: 1161.847, y: 0}
1677+
m_SizeDelta: {x: 2283.694, y: 0}
16781678
m_Pivot: {x: 0.5, y: 0.5}
16791679
--- !u!114 &1661390145
16801680
MonoBehaviour:
@@ -1768,8 +1768,8 @@ RectTransform:
17681768
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
17691769
m_AnchorMin: {x: 0, y: 0}
17701770
m_AnchorMax: {x: 0, y: 0}
1771-
m_AnchoredPosition: {x: 1259.3727, y: 0}
1772-
m_SizeDelta: {x: 2478.7454, y: 0}
1771+
m_AnchoredPosition: {x: 1161.847, y: 0}
1772+
m_SizeDelta: {x: 2283.694, y: 0}
17731773
m_Pivot: {x: 0.5, y: 0.5}
17741774
--- !u!114 &1688502349
17751775
MonoBehaviour:

sample/ProjectSettings/ProjectSettings.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ PlayerSettings:
797797
WebGL: 1
798798
Windows Store Apps: 1
799799
XboxOne: 1
800-
iPhone: 3
800+
iPhone: 4
801801
tvOS: 1
802802
incrementalIl2cppBuild: {}
803803
suppressCommonWarnings: 1

0 commit comments

Comments
 (0)