- Notifications
You must be signed in to change notification settings - Fork67
Add a quick "custom" build command#199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Expects a editor script with in the format of:```csusing System.Diagnostics;using System.IO;using System.Linq;using UnityEditor;using UnityEngine;public static class UnityLauncherProToolsCustom{ [MenuItem("Tools/Build custom")] public static void BuildCustom() { var settings = new BuildPlayerOptions(); settings.scenes = GetScenes(); settings.locationPathName = Path.GetFullPath(Path.Combine(Application.dataPath, "..", "..", "..", "Build", PlayerSettings.productName + ".exe")); settings.target = EditorUserBuildSettings.activeBuildTarget; var report = BuildPipeline.BuildPlayer(settings); if (report.summary.result == UnityEditor.Build.Reporting.BuildResult.Succeeded) Process.Start(Path.GetDirectoryName(settings.locationPathName)); } static string[] GetScenes() { return EditorBuildSettings.scenes.Where(scene => scene.enabled).Select(scene => scene.path).ToArray(); }}```thanks ill check! question: |
unitycoder commentedAug 24, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
i'm thinking that this could have a settings field, for your own custom script to use for Builds.
|
f90e8ac intounitycoder:masterUh oh!
There was an error while loading.Please reload this page.

Expects a editor script with in the format of:
UnityLauncherProToolsCustom.BuildCustom, e.g.: