Skip to content

Latest commit

 

History

History
105 lines (67 loc) · 4.25 KB

README.md

File metadata and controls

105 lines (67 loc) · 4.25 KB

Unity Volt Builder

License Discord YouTube

Voltstro-Studios' Unity build tool, with a modular scripting design.

Features

  • 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

Installation

There are three main sources on how you can install this package. Pick which ever one suites you the best!

Voltstro UPM

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.

OpenUPM

You can install this package via OpenUPM.

To install it, use their CLI:

openupm-cli add dev.voltstro.unityvoltbuilder

Git

To install it via the package manager with git you will need to:

  1. Open up the package manager via Windows -> Package Manager
  2. Click on the little + sign -> Add package from git URL...
  3. Type https://github.com/Voltstro-Studios/UnityVoltBuilder.git and add it
  4. 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.

Using the tool

To use the tool, go to Tools -> Unity Volt Builder -> Volt Builder. It will open up a screen that looks like this:

Preview

(Note: This is the window when Addressables are installed)

It is recommended to dock the window somewhere for convince.

Build Actions

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.

ZipOnBuild

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.

Custom Build Actions

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.

Addressables

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.

Authors

Voltstro – Initial WorkVoltstro

License

This project is licensed under the Apache-2.0 license – see the LICENSE.md file for details.