Created
March 25, 2024 12:26
-
-
Save baba-s/e65d68f21c6b31ce8aebdf83c194b078 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
using UnityEditor; | |
[InitializeOnLoad] | |
public static class Example | |
{ | |
static Example() | |
{ | |
BuildPlayerWindow.RegisterGetBuildPlayerOptionsHandler( OnGetBuildPlayerOptions ); | |
} | |
private static BuildPlayerOptions OnGetBuildPlayerOptions( BuildPlayerOptions buildPlayerOptions ) | |
{ | |
buildPlayerOptions.scenes = EditorBuildSettings.scenes.Select( x => x.path ).ToArray(); | |
buildPlayerOptions.locationPathName = "app.apk"; | |
buildPlayerOptions.targetGroup = BuildTargetGroup.Android; | |
buildPlayerOptions.target = BuildTarget.Android; | |
return buildPlayerOptions; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment