Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: aevitas/unity-patch
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.03
Choose a base ref
...
head repository: aevitas/unity-patch
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Bug report
about: Report an issue with the patcher
title: ''
labels: ''
assignees: ''

---

**Description**
A clear and concise description of what the bug is.

**Version Information**
* What Operating System are you running the patcher on?
* What Unity Version are you using?

**Diagnostics**
What does the patcher output instead of the expected behaviour?

**Arguments**
Please provide the exact command line arguments you are using the patcher with, e.g.:

`sudo ./linux-x64/Patcher -e=/path/to/Unity -t=dark -linux`
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/incompatible-version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Incompatible Version
about: Report an issue related to patcher compatibility
title: ''
labels: ''
assignees: ''

---

**Description**
A clear and concise description of what the bug is.

**Version Information**
* What Operating System are you running the patcher on?
* What Unity Version are you using?

**Diagnostics**
What does the patcher output instead of the expected behaviour?

**Arguments**
Please provide the exact command line arguments you are using the patcher with, e.g.:

`sudo ./linux-x64/Patcher -e=/path/to/Unity -t=dark -linux`

**Binaries**
If possible, provide a link to the Unity binary that corresponds with the version and OS you're using.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CI

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Setup
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.201
- name: Build
run: dotnet build ./src/Patcher.sln --configuration Release
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -258,4 +258,8 @@ paket-files/

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
*.pyc
/Patcher/Properties/launchSettings.json

# macOS
.DS_Store
174 changes: 0 additions & 174 deletions Patcher/Program.cs

This file was deleted.

77 changes: 72 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,87 @@
![CI Status](https://github.com/aevitas/unity-patch/workflows/CI/badge.svg)

Unity Patch
===========

This repository contains a patch for Unity that allows you to set options inacessible from the application's menus.
This repository contains a patch for Unity that allows you to set options inaccessible from the application's menus.

Currently, the only supported option for the patch is switching between the dark and light themes in Unity.

Usage
=====

We provide binaries for Windows 10, Linux, and macOSX. All compiled binaries are x64. See the [release section](https://github.com/aevitas/unity-patch/releases). Alternatively, you can build the patch from source.
We provide binaries for Windows 10, Linux, and macOS. All compiled binaries are x64.
See the [release section](https://github.com/aevitas/unity-patch/releases).
Alternatively, you can build the patch from source.

Run `patcher.exe` on windows, `patcher.dll` on Linux. By default, it will locate your Unity install at `C:\Program Files\Unity\Editor\Unity.exe`, which is obviously wrong for both Linux and macOS, and it will set your theme to dark.
Run `patcher.exe` on windows, or alternatively `Patcher` on Linux or MacOS. By default, it will locate your Unity install
at `C:\Program Files\Unity\Editor\Unity.exe`, which is obviously wrong for both Linux and macOS, and it will set your theme to dark.

You can pass various arguments to the patcher:

* `exe=|e=` to specify the location of the Unity executable
* `theme=|t=` to set the theme, currently only `light` or `dark` are valid
* `exe=` or `e=` to specify the location of the Unity executable
* `theme=` or `t=` to set the theme, currently only `light` or `dark` are valid
* `help` or `h` to display the options the patcher supports
* `--windows` for Windows builds of Unity
* `--linux` for Linux builds of Unity
* `--mac` for MacOS builds of Unity
* `--force` or `--f` to gently apply force

Depending on your system, looking up the offsets to patch can take a couple moments.

Unity Versions
--------------

The patcher supports multiple versions of Unity. Versions can be specified by passing the `-v=` or `--version=` command line argument.

For instance, if you want to patch Unity version 2020.1 on Windows, you'd run:

```
patcher.exe --windows --version=2020.1 --t=dark
```

Currently, the following OS and Unity version combinations are supported:

| | Windows | MacOS | Linux |
|---------|:------------------:|:------------------:|:------------------:|
| 2020.2a | :x: | :white_check_mark: | :white_check_mark: |
| 2020.1b | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| 2019.4 | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| 2019.3 | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| 2019.2 | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| 2019.1 | :x: | :white_check_mark: | :white_check_mark: |
| 2018.4 | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| 2018.3 | :white_check_mark: | :x: | :x: |
| 2018.2 | :white_check_mark: | :x: | :x: |

If you don't specify a version, the patcher will select the most recent version for your operating system.

Troubleshooting
===============

To get the highest chance of success, you should always run the patch on a clean install of Unity. If that doesn't work, you can try:

* Resetting your user preferences either manually or by calling [`EditorPrefs.DeleteAll()`](https://github.com/aevitas/unity-patch/issues/17#issuecomment-592070343)
* On MacOS Unity might be displaying a mix of Dark and Light Themes after patching. This can be resolved by restarting Unity. After restarting Unity the Theme should display correctly.
* If you get `command not found`, try changing permissions for the file by running `chmod +x Patcher`. If running the patcher again gives you the following error `Can not patch the specified file - it is marked as read only!` then you need to check Unity to ensure you have write permissions for the `Unity.app` file as well.

Issues
======

If the patcher doesn't work, please let us know by opening an [issue](https://github.com/aevitas/unity-patch/issues), and provide as much details as you can. We provide some issue templates for common issues - please use them when applicable. They help us resolve issues faster.

Linux and MacOS
===============

When running the patcher on Linux or MacOS, be sure to run the respective binaries for your operating system. They are located in `osx-x64` for Mac, and `linux-x64` for Linux.

* Mac users should run the patcher with the `--mac` command line option
* Linux users should run the patcher with the `--linux` command line option

For example, on Linux you would run:

`sudo ./linux-x64/Patcher -e=/path/to/Unity --t=dark --linux`

or on Mac:

`sudo ./osx-64/Patcher -e=/Applications/Unity/Hub/Editor/<VERSION>/Unity.app/Contents/MacOS/Unity --mac --t=dark`
File renamed without changes.
Loading