ChaosPanel.cs — One Script to Rule the UI


No setup. No prefabs. Just chaos.

ChaosPanel.cs is a one-script solution for Unity developers who need a fast, self-generating debug panel without relying on the Unity Console or pre-built UI.

Whether you're prototyping systems, testing interactions, or simply need a runtime log visible during play, ChaosPanel.cs offers a clean and frictionless solution.

Features

  • Auto-generates a runtime UI panel and canvas on play

  • Live log window with static ChaosPanel.Log("message") method

  • Toggle panel visibility using the Escape key

  • "Clear Log" and "Reset Scene" buttons built-in

  • Fully self-contained; no UI prep or prefab setup required

Installation

  1. Import ChaosPanel.cs into your Unity project.

  2. Create an empty GameObject in any scene.

  3. Attach the script to that GameObject.

  4. Press Play — the panel will auto-generate.

How to Use

  • Log messages from any script using:
    ChaosPanel.Log("Your message here");

  • Press the Escape key during play to show or hide the panel.

  • Use the on-screen buttons to:

    • Clear all log messages

    • Reload the current scene

Technical Notes

  • Supports up to 50 log lines (auto-truncates oldest entries)

  • All UI elements are created at runtime using UnityEngine.UI

  • Font: Unity's built-in Arial

  • Display: Green monospaced text on a black background for high visibility

  • This script functions in Play Mode only (not available in the Unity Editor)

License

You may use this script in any personal, commercial, or experimental Unity project.

  • No credit required (but appreciated)

  • You may not resell this file or any direct derivative as a standalone product

© GlitchedWares, 2025
https://glitchedwares.itch.io/

Files

ChaosPanel_Script.zip 2.6 kB
30 days ago

Get ChaosPanel.cs – GlitchedWares Debug UI

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.