Console Window

๐Ÿงฉ Open console window in editor

  • Navigate to: Window > โŒจ Ninjadini Console (new window)
  • Select it again to open another window โ€” you can have several open at once.
  • Right-click a GameObject in Unityโ€™s Hierarchy โ†’ Inspect in โŒจ NjConsole opens it straight in the consoleโ€™s Object Inspector.

Screenshot of editor windows

๐Ÿ•น๏ธ Open console in game view

  • Keyboard: Press the ` key (top-left on US keyboard). Press again to close.
  • Keyboard: Shift + ` opens the console straight into the Command Line prompt.
  • Mouse: Hold at the top-left corner of the game screen for 1 second.
  • Mouse (alternative): Double-tap the top-left corner of the screen.

You can customize these triggers in Project Settings > Ninjadini โŒจ Console > Playmode Overlay.

๐Ÿ‘€ Sidebar Tips (During Play Mode)

  • Press and hold any empty area of the sidebar to temporarily peek behind the console.
  • On screens 650px or wider (or taller), a window mode button at the end of the sidebar lets you undock and resize the overlay.

๐Ÿงญ The panels

Panel What it does Docs
Logs Log viewer, filtering, search, and the Command Line Logging, Command Line
Options Your cheats / debug menu, plus shortcuts Options Menu
Hierarchy Live scene tree โ€” drill into GameObjects and their components Inspector & Utilities
Utilities FPS/memory monitors, PlayerPrefs, editable screen & quality settings, device info, log export, UI scale Inspector & Utilities
Editor Options Options that work outside play mode (editor window only) Options Menu

Every panel except Logs can be switched off for player builds under ... > Features, and you can add your own โ€” see Custom Panels.

๐Ÿ” Setting up Access Challenge

Gate the console behind a passcode:

  1. Go to Project Settings โ†’ Ninjadini โŒจ Console โ†’ Playmode Overlay โ†’ Access Challenge
  2. Click Add Access Challenge
  3. Select Secret Pass
  4. Set a passcode and (optionally) a hint message
  5. Press Apply changes
  6. Activating the overlay in play mode now prompts for the passcode

Screenshot of Secret Pass Challenge

๐Ÿ”ง Advanced topics

โšก Auto start console

The overlay auto-starts in play mode. With activation triggers set up (` key, hold at corner) it stays hidden until one fires.

Disable auto start under Project Settings > Ninjadini โŒจ Console > Playmode Overlay, then start it yourself with NjConsole.Overlay.EnsureStarted() โ€” which also starts hidden if you have triggers. To force it open, NjConsole.Overlay.ShowWithAccessChallenge().

๐Ÿ•น๏ธ Setting up your own activation trigger

Roll your own way to open the overlay in play mode. ConsoleKeyPressTrigger and ConsolePressAndHoldTrigger are the built-in examples to crib from.

  1. Create a class that implements both IConsoleOverlayTrigger and IConsoleExtension.
  2. Add [Serializable] attribute to the class.
  3. Go to Project Settings > Ninjadini โŒจ Console > Playmode Overlay > Add Trigger > add your new class
  4. Press Apply changes

Example code below toggles the overlay on shift + right mouse click.

[System.Serializable]
public class ShiftRightClickConsoleTrigger : IConsoleOverlayTrigger, IConsoleExtension
{
    ConsoleOverlay _overlay;
    public void ListenForTriggers(ConsoleOverlay overlay)
    {
        _overlay = overlay;
        overlay.schedule.Execute(Update).Every(1);
    }

    void Update()
    {
        // using old input manager...
        if (Input.GetMouseButtonDown(1) && (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))) {
            if (_overlay.Showing) {
                _overlay.Hide();
            } else {
                _overlay.ShowWithAccessChallenge();
            }
        }
    }
}

Use ShowWithAccessChallenge() rather than ShowWithoutAccessChallenge(), so a configured challenge still applies.

๐Ÿ” Setting up your own custom access challenge type

Tie the gate into your own login system, or anything else.

  1. Create a class that implements both IConsoleAccessChallenge and IConsoleExtension.
  2. Add [Serializable] attribute to the class.
  3. Go to Project Settings > Ninjadini โŒจ Console > Playmode Overlay > Add Access Challenge > add your new class
  4. Press Apply changes

This one asks a maths question before letting you in.

[System.Serializable]
public class MathsAccessChallenge : IConsoleAccessChallenge, IConsoleExtension
{
    static bool _passed; // persist this in PlayerPrefs or similar

    public bool ShowingChallenge { get; private set; }

    void IConsoleModule.OnAdded(ConsoleModules console)
    {
        _passed = false;
        ShowingChallenge = false;
    }

    public bool IsAccessChallengeRequired()
    {
        return !_passed;
    }

    public void ShowChallenge(Action callbackOnSuccess)
    {
        ShowingChallenge = true;
        var numA = UnityEngine.Random.Range(1, 100);
        var numB = UnityEngine.Random.Range(1, 100);
        // This could be anything, like your own sign in dialog. We are just using the text prompt from Console for simplicity.
        ConsoleTextPrompt.Show(new ConsoleTextPrompt.Data()
        {
            Title = $"{numA} + {numB} = ?",
            ResultCallback = (response) =>
            {
                if (response == null) // user pressed close btn
                {
                    ShowingChallenge = false;
                    return true;
                }
                if (int.TryParse(response, out var responseInt) && responseInt == numA + numB)
                {
                    ShowingChallenge = false;
                    _passed = true;
                    callbackOnSuccess();
                    return true;
                }
                return false; // returning false keeps the prompt open
            }
        });
    }
}

๐ŸŽ›๏ธ Controlling the overlay from code

NjConsole.Overlay.EnsureStarted();          // start it, hidden, waiting for triggers
NjConsole.Overlay.ShowWithAccessChallenge();// show, running the access challenge first
NjConsole.Overlay.Show();                   // show, skipping the access challenge
NjConsole.Overlay.Hide();
NjConsole.Overlay.Showing;                  // bool

NjConsole.Overlay.SetActivePanel<ConsoleOptions>();   // or by Type, or by panel name string
NjConsole.Overlay.ActivePanel;
NjConsole.Overlay.Context;                  // the ConsoleContext for this overlay
NjConsole.Overlay.Destroy();

All safe no-ops when NjConsole is stripped with NJCONSOLE_DISABLE โ€” see Build customization.

NjConsole doc home