Reset After Play Mode
Automatically resets asset properties after exiting Play Mode, preventing unwanted diffs in source control. Ideal for managing runtime modifications to Materials, ScriptableObjects, and other assets that change during gameplay testing without cluttering your version control history.
com.gilzoide.reset-after-play-mode 
Install via UPM
Add to Unity Package Manager using this URL
https://www.pkglnk.dev/reset-after-play-mode.git README Markdown
Copy this to your project's README.md
## Installation
Add **Reset After Play Mode** 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/reset-after-play-mode.git
```
[](https://www.pkglnk.dev/pkg/reset-after-play-mode)README
Reset After Play Mode
Editor-only ScriptableObject that resets other assets' properties after exiting Play Mode.
Use this to avoid unwanted diffs in source control for Materials, ScriptableObjects or other assets that get modified during gameplay.
How to install
Either:
- Use the openupm registry and install this package using the openupm-cli:
openupm add com.gilzoide.reset-after-play-mode - Install using the Unity Package Manager with the following URL:
https://github.com/gilzoide/unity-reset-after-play-mode.git#1.0.0 - Clone this repository or download a snapshot of it directly inside your project's
AssetsorPackagesfolder. - Just copy the ResetAfterPlayMode.cs script into your project. Since it works in the editor only, feel free to add it inside an
Editorfolder to avoid the script being included in builds.
How to use
Use the
Assets -> Create -> Reset After Play Modemenu item to create an instance of theResetAfterPlayModeobject in your project.Since it works in the editor only, make sure to save this new asset to an
Editorfolder to avoid it getting included in builds.Add the assets that should be reset after exiting play mode in its
Assetslist.Play the game. Modify the assets however you want during gameplay.
After exiting Play Mode, check that the assets are back to their initial state.
Enjoy 🍾
Comments
No comments yet. Be the first!
Sign in to join the conversation
Sign In