{"id":13661568,"url":"https://github.com/the-mr-matt/DebugUISystem","last_synced_at":"2025-04-25T03:30:23.066Z","repository":{"id":219325906,"uuid":"339951032","full_name":"the-mr-matt/DebugUISystem","owner":"the-mr-matt","description":"Create a runtime menu system with buttons and windows for debugging in one line of code.","archived":false,"fork":false,"pushed_at":"2021-02-19T22:31:01.000Z","size":842,"stargazers_count":78,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-10T16:45:19.119Z","etag":null,"topics":["console","debug","diagnostic","menu","panel","stats","toolbar","ui","unity","window"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/the-mr-matt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-18T05:58:17.000Z","updated_at":"2024-08-21T13:15:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"bbf6d918-858f-4b56-a12c-ff8321a3ee6f","html_url":"https://github.com/the-mr-matt/DebugUISystem","commit_stats":null,"previous_names":["the-mr-matt/debuguisystem"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-mr-matt%2FDebugUISystem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-mr-matt%2FDebugUISystem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-mr-matt%2FDebugUISystem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-mr-matt%2FDebugUISystem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/the-mr-matt","download_url":"https://codeload.github.com/the-mr-matt/DebugUISystem/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250747612,"owners_count":21480677,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["console","debug","diagnostic","menu","panel","stats","toolbar","ui","unity","window"],"created_at":"2024-08-02T05:01:37.196Z","updated_at":"2025-04-25T03:30:22.736Z","avatar_url":"https://github.com/the-mr-matt.png","language":"C#","funding_links":[],"categories":["C\\#"],"sub_categories":[],"readme":"![License MIT](https://img.shields.io/badge/license-MIT-green.svg)\n\n# Debug UI System\n\n![screen](https://i.imgur.com/n9ZBpC3.png)\n\nUses IMGUI to draw a menu system. Add actions and windows to this menu system with a little as one line of code.\n\n## Installation\n\nDownload the latest Unity package here: https://github.com/the-mr-matt/DebugUISystem/releases\n\n\u003cem\u003eThis is not included by default in case you use a different input system.\u003c/em\u003e\n\n## Usage\n\nSee example folder for a demo.\n\n1. Add the DebugUISystem prefab into your scene.\n2. Call `DebugUISystem.RegisterAction` or `DebugUISystem.RegisterWindow`.\n\nTo hide the menus, simple disable the `DebugUISystem` component.\n\n## Path\n\nWhen registering an `action` or `window`, you need to pass in a `path`. Paths are of the following format:\n\n`Menu/Sub Menu/Sub Menu 2/Action` or `Menu/Sub Menu/Sub Menu 2/Window Name`\n\nYou can add as many windows or actions to a menu or sub menu as you like.\n\n\u003cem\u003ee.g.\u003c/em\u003e `Diagnostics/Stats/FPS` will generate a menu button called Diagnostics, with a sub menu called Stats, with an FPS button.\n\n## Actions\n\nActions are a single button press. Use a lambda or a function as the action. This is called when the button is pressed.\n\n```csharp\nprivate void Start()\n{\n    string path = \"File/Save\";\n    DebugUISystem.RegisterAction(path: path, action: () =\u003e Debug.Log(\"Action Called\"));\n}\n```\n\n## Windows\n\nWindows can contain customizable content. Content is drawn using IMGUI -- you are free to draw whatever you want inside the window. `GUILayout` is recommended for ease of use.\n\n\u003cem\u003eWindows are not resizable.\u003c/em\u003e\n\n```csharp\nprivate void Start()\n{\n    string path = \"File/Save\";\n    DebugUISystem.RegisterWindow(path: path, defaultSize: new Vector2(250, 400), onDrawWindow: () =\u003e\n    {\n        GUILayout.BeginHorizontal();\n        GUILayout.Button(\"Left\");\n        GUILayout.Button(\"Right\");\n        GUILayout.EndHorizontal();\n    });\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-mr-matt%2FDebugUISystem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-mr-matt%2FDebugUISystem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-mr-matt%2FDebugUISystem/lists"}