Voltstro-Studios' Unity build tool, with a modular scripting design.
- Easy to get at menu of settings to build your Unity player.
- Build Actions (Can add custom GUI to the tool, do something before and after a build)
- Three are provided, CopyFilesOnBuild, RunOnBuild and ZipOnBuild
- Easily do a "Quick" build, a new build, or a scripts only build.
- Easily add additional commands to the main window
- Addressables commands
There are three main sources on how you can install this package. Pick which ever one suites you the best!
You can install this package from our custom UPM registry. To setup our registry, see here.
Once you have the registry added to your project, you can install it like any other package via the package manager.
You can install this package via OpenUPM.
To install it, use their CLI:
openupm-cli add dev.voltstro.unityvoltbuilder
To install it via the package manager with git you will need to:
- Open up the package manager via Windows -> Package Manager
- Click on the little + sign -> Add package from git URL...
- Type
https://github.com/Voltstro-Studios/UnityVoltBuilder.git
and add it - Unity will now download and install the package
Please note that you will have to manually check for updates, and replace the hash (or tag version) in your project's packages-lock.json
file.
To use the tool, go to Tools -> Unity Volt Builder -> Volt Builder. It will open up a screen that looks like this:
(Note: This is the window when Addressables are installed)
It is recommended to dock the window somewhere for convince.
You can add build actions under the 'Build Actions' menu, the select what build action you want to add by selecting it in the dropdown, then press the '+' button.
This build action requires the com.unity.sharp-zip-lib
package to be installed. By default, the package DOES NOT appear under the Unity Registry menu in the package manager, you will need to add it manually by either altering your manifest.json
file, or by typing com.unity.sharp-zip-lib
into the Add package from git URL option in the package manager.
To add a custom Build Action, add a class to your project, and make it implement IBuildAction
. You will then need to add the required methods: OnGUI()
, OnBeforeBuild(string buildLocation, BuildTarget buildTarget, ref BuildOptions buildOptions)
, and OnAfterBuild(string buildLocation, BuildReport report)
.
In the end it should look like this:
using UnityVoltBuilder.Actions;
public class CustomBuildAction : IBuildAction
{
public void OnGUI()
{
//Do your GUI stuff here
}
public void OnBeforeBuild(string buildLocation, BuildTarget buildTarget, ref BuildOptions buildOptions)
{
//Do stuff you want to do before a build, if you want to you can modify the build options here as well
}
public void OnAfterBuild(string buildLocation, BuildReport report)
{
//Do stuff here after a build
}
}
After that, the tool will automatically add it as a selectable option in the dropdown in the Build Actions.
If you have the Unity Addressables package installed, additional commands will be provided in the main window, which will allow you to both build the addressables and change the play mode script without needing the Addressables Groups window opened.
Voltstro – Initial Work – Voltstro
This project is licensed under the Apache-2.0 license – see the LICENSE.md file for details.