Toggle collision, goto any level and other debug settings in my customized inspector

Using the [Header] attribute I made my inspector look a little nicer, and then added hotkey toggles for collision damage, heat damage(an extra mechanic I have in my game that depletes players heat shield as a timer mechanic), and to go to the next level(by default) or any level you type into the field.

Here is my serialized field declarations with the [Header] attributes

Capture4

and the code I used, note I used the #if UNITY_EDITOR instead of relying on creating a dev build.

I had already programmed damage toggles into my code previously, but just down created hotkeys to do it for me.

Privacy & Terms