chore: keep editor runtime tools out of Android builds
This commit is contained in:
@@ -51,9 +51,10 @@ namespace MagnetismHeroes.Editor
|
||||
string apkPath = Environment.GetEnvironmentVariable("MAGNETISM_APK_PATH");
|
||||
if (string.IsNullOrEmpty(apkPath)) throw new InvalidOperationException("MAGNETISM_APK_PATH is required.");
|
||||
EditorUserBuildSettings.buildAppBundle = false;
|
||||
EditorUserBuildSettings.development = false;
|
||||
BuildReport report = BuildPipeline.BuildPlayer(new BuildPlayerOptions {
|
||||
scenes = new[] { MainScenePath }, locationPathName = apkPath,
|
||||
target = BuildTarget.Android, options = BuildOptions.Development
|
||||
target = BuildTarget.Android, options = BuildOptions.None
|
||||
});
|
||||
Debug.Log($"[AndroidBuild] {report.summary.result}: {report.summary.totalSize} bytes, {report.summary.totalErrors} errors.");
|
||||
if (report.summary.result != BuildResult.Succeeded) throw new InvalidOperationException("Android build did not succeed.");
|
||||
|
||||
Reference in New Issue
Block a user