浏览代码

benchmark loading on ios fix (#135)

* fixed build options tweaking in benchmark window

* fixed benchmark mode being stuck on loading screen on ios

CmdArgs() was throwing an exception due to empty argument, and it made it disabled, calling OnDisable, and removing "level loaded" callback, so we were never switching to the game level itself
/main
GitHub 4 年前
当前提交
73770d48
共有 2 个文件被更改,包括 5 次插入7 次删除
  1. 5
      Assets/Scripts/Editor/Benchmark/BenchmarkWindow.cs
  2. 7
      Assets/Scripts/GameSystem/AppSettings.cs

5
Assets/Scripts/Editor/Benchmark/BenchmarkWindow.cs


assetGUID = EditorPrefs.GetString(assetGuidKey);
if (assetGUID == "")
assetGUID = AssetDatabase.GUIDFromAssetPath("Assets/resources/benchmarksettings.asset").ToString();
_benchConfigData = AssetDatabase.LoadAssetAtPath<BenchmarkConfigData>(AssetDatabase.GUIDToAssetPath(assetGUID));
}

options.locationPathName = $"Builds/Benchmark/{target:G}/BoatattackBenchmark{ext}";
options.target = target;
options.targetGroup = BuildPipeline.GetBuildTargetGroup(target);
options.options = BuildOptions.Development;
options.options = BuildOptions.AutoRunPlayer;
options.options |= (BuildOptions.Development | BuildOptions.AutoRunPlayer);
var curTar = EditorUserBuildSettings.activeBuildTarget;
if (target != curTar)

7
Assets/Scripts/GameSystem/AppSettings.cs


DontDestroyOnLoad(ConsoleCanvas);
MainCamera = Camera.main;
}
private void OnDisable()
{
SceneManager.sceneLoaded -= LevelWasLoaded;

}
yield return assetLoading;
}
public static void ExitGame(string s = "null")
{
if(s != "null")

if (args.Length <= 0) return;
foreach (var argRaw in args)
{
if (argRaw[0] != '-') continue;
if(string.IsNullOrEmpty(argRaw) || argRaw[0] != '-') continue;
var arg = argRaw.Split(':');
switch (arg[0])

正在加载...
取消
保存