Skip to content

inc8877/UnityDebugModeDefineSymbol

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

UnityDebugModeDefineSymbol

openupm

A useful tool for running specific code
What it is?

Table of Contents

Compatibility

Unity Compatible
2021
2020
2019

How to use

  1. Add this tool to your project [how]
  2. Manage debug mode by following this path Tools -> Debug Mode Definition -> On / Off

choiceDiaologWindow_DebugMode

  1. For code that should be executed only when the debug mode is turned on, put it in the definition like this:
// ... code somewhere
#if DEBUG_MODE_IN_USE
// code here will be executed if the debug mode is turned on
#endif
// ... code somewhere

Installation

Install via OpenUPM

The package is available on the openupm registry. It's recommended to install it via openupm-cli.

openupm add com.inc8877.unity-debug-mode-define-symbol

Install via Git URL

Open Packages/manifest.json with your favorite text editor. Add the following line to the dependencies block.

{
  "dependencies": {
    "com.inc8877.unity-debug-mode-define-symbol": "https://github.com/inc8877/UnityDebugModeDefineSymbol.git",
   }
}

Credits

Cover background by Florian Olivo