Created
October 13, 2021 02:11
-
-
Save tatelax/b4f9cfdead6646f56662789fb21aa82d to your computer and use it in GitHub Desktop.
Build CLI
This file contains 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
namespace Scripts.Utils.BuildMaker.Editor | |
{ | |
public static class BuildCLI | |
{ | |
// Called via editor in batchmode command line arguments | |
public static void Build() | |
{ | |
string[] args = System.Environment.GetCommandLineArgs(); | |
string buildProfile = null; | |
for (int i = 0; i < args.Length; i++) | |
{ | |
if (args[i] != "-buildProfile") continue; | |
buildProfile = args[i + 1]; | |
break; | |
} | |
Debug.Log("Build Profile = " + buildProfile); | |
Execute(AssetDatabase.LoadAssetAtPath(buildProfile, typeof(BuildProfileScriptableObject)) as BuildProfileScriptableObject); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment