02. Developer Mode

  10. Extending Power Inspector No Comments

Many assertions, console messages and some functionality is stripped away from Power Inspector’s code, unless a special development mode is enabled.

In normal day-to-day use you do not want this mode active, to ensure that Power Inspector runs as fast as possible with minimal garbage generation, and to avoid messages cluttering up your console window. If however you’re extending Power Inspector with your own code, or debugging an issue, it can sometimes be useful to temporarily enable this mode.

Enabling Development Mode

To enable development mode, follow these steps:

  1. Click the context menu icon at the top-right corner of the Power Inspector window while holding down the shift key on your keyboard.
  2. Click the item Developer Mode > Enabled.

Power Inspector will add two new items to the Scripting Define Symbols list in your Player settings: “DEV_MODE” and “PI_ASSERTATIONS“.
Your scripts will then be recompiled, this time with new developer-only code included.

Disabling Development Mode

To disable development mode, repeat the same steps as when enabling development mode.