GitUnityBuildValidator
Validates Unity builds based on Git/GitHub branches and commits, and warns the user if the project is behind the specified branch when building.
com.noathesoap.gitunitybuildvalidator 
Install via UPM
Add to Unity Package Manager using this URL
https://www.pkglnk.dev/gitunitybuildvalidator.git README Markdown
Copy this to your project's README.md
## Installation
Add **GitUnityBuildValidator** to your Unity project via Package Manager:
1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/gitunitybuildvalidator.git
```
[](https://www.pkglnk.dev/pkg/gitunitybuildvalidator)README
GitUnityBuildValidator
A Unity Editor tool that validates your Unity builds based on your Git/GitHub branch status. It automatically warns you if your local project is behind the specified remote branch when you try to build, helping you avoid building outdated versions of your project.
Features
- Pre-Build Validation: Intercepts the build process to check your Git repository's status.
- Customizable Branch: Specify which branch to validate against (defaults to
main). - Warning Dialog: Displays a clear warning dialog if you are behind the remote branch, giving you the option to cancel or proceed with the build.
Installation
Add package from git URL
- In Unity, open the Package Manager (Window > Package Manager).
- Click the + button in the top left corner.
- Select Add package from git URL...
- Enter the URL of this repository:
https://github.com/NoaTheSoap/GitUnityBuildValidator.git - Click Add.
Add package from disk (For local development)
- Clone or download this repository to your computer.
- In your Unity project, go to Window > Package Manager.
- Click the + button in the top left corner.
- Select Add package from disk...
- Navigate to the downloaded folder and select the
package.jsonfile.
Usage
Configuration
You can configure the validator through its custom Editor window.
In the Unity Editor top menu bar, go to Tools > GitBuildValidator.
This will open the Git Validator settings window.

Branch: Enter the name of the branch you want to validate against (e.g.,
main,development). The tool will automatically fetch and warn you if you enter a branch that doesn't exist on the remote.Display Warning: Toggle this on or off to enable or disable the pre-build warning popup.
Building
Once configured, the tool works automatically when you build your project (File > Build Settings > Build).
If your local branch is up to date with the remote branch, the build will proceed normally.
If your local branch is behind the remote setting, a warning dialog will pop up:

- Click Build to ignore the warning and build anyway.
- Click Cancel build to abort the build process so you can pull the latest changes.
Requirements
- Unity 6000.3 or newer (tested with
6000.3.9f1). - Git installed and accessible via your system's command line (ensure Git is added to your PATH environment variable).
No comments yet. Be the first!