Code Monkey home page Code Monkey logo

unity-reset-after-play-mode's Introduction

Reset After Play Mode

openupm

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 Assets or Packages folder.
  • Just copy the ResetAfterPlayMode.cs script into your project. Since it works in the editor only, feel free to add it inside an Editor folder to avoid the script being included in builds.

How to use

  1. Use the Assets -> Create -> Reset After Play Mode menu item to create an instance of the ResetAfterPlayMode object in your project.

    Since it works in the editor only, make sure to save this new asset to an Editor folder to avoid it getting included in builds.

  2. Add the assets that should be reset after exiting play mode in its Assets list.

  3. Play the game. Modify the assets however you want during gameplay.

  4. After exiting Play Mode, check that the assets are back to their initial state.

  5. Enjoy ๐Ÿพ

unity-reset-after-play-mode's People

Contributors

gilzoide avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.