{"id":19453417,"url":"https://github.com/barionlp/unityconsole","last_synced_at":"2025-10-18T19:01:59.761Z","repository":{"id":190787488,"uuid":"657648955","full_name":"BarionLP/UnityConsole","owner":"BarionLP","description":"A Unity Runtime Console using UI Toolkit","archived":false,"fork":false,"pushed_at":"2025-04-20T07:59:02.000Z","size":130,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-20T08:41:39.725Z","etag":null,"topics":["unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BarionLP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2023-06-23T14:18:33.000Z","updated_at":"2025-04-20T07:59:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"59fc1917-0e88-44da-b27f-bd4c094badb4","html_url":"https://github.com/BarionLP/UnityConsole","commit_stats":null,"previous_names":["barionlp/unityconsole"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/BarionLP/UnityConsole","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BarionLP%2FUnityConsole","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BarionLP%2FUnityConsole/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BarionLP%2FUnityConsole/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BarionLP%2FUnityConsole/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BarionLP","download_url":"https://codeload.github.com/BarionLP/UnityConsole/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BarionLP%2FUnityConsole/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266606351,"owners_count":23955257,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["unity"],"created_at":"2024-11-10T17:04:25.327Z","updated_at":"2025-10-18T19:01:59.637Z","avatar_url":"https://github.com/BarionLP.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UnityConsole\nA Unity Runtime Console using UI Toolkit\n\n## Usage\n- requires Unity UI package (UI Toolkit)\n- new input system recommended\n- install Unity Console package https://github.com/BarionLP/UnityConsole.git \n- add the ConsolePrefab to your scene\n\n### Add Messages\n```csharp\nConsoleManager.AddMessage(\"message\");\nConsoleManager.AddMessage(\"\u003ccolor=yellow\u003emessage\u003c/color\u003e\"); // rich text support \nConsoleManager.AddWarningMessage(\"warning\");\nConsoleManager.AddErrorMessage(\"error\");\n```\n### Hide and Show\n`ConsoleManager.Hide()`/`ConsoleManager.Show()`\u003cbr\u003e\nThe `ConsoleToggle` component handles hiding and showing the console\u003cbr\u003e\nYou can listen to `ConsoleManager.OnShow` and `ConsoleManager.OnHide`  \n\n### Input Handlers\nby default the console just prints input messages\n```csharp\n// override the default handler\nConsoleManager.OverrideDefaultHandler(new ConsoleMessageHandler(input =\u003e {}));\n// registering other handlers\nchar prefix = '/'; // inputs staring with this prefix are handed to this handler\nConsoleManager.RegisterHandler(prefix, new ConsoleMessageHandler(input =\u003e {}));\n```\n\n#### Custom Handlers\n```csharp\n// implement IConsoleHandler\npublic sealed class CustomHandler : IConsoleHandler\n{\n    // whether the prefix should be removed before calling Handle\n    public bool PassPrefix =\u003e false;\n    \n    public void Handle(ReadOnlySpan\u003cchar\u003e input)\n    {\n        // whatever you want\n    }\n\n    // optional\n    public string GetHint(ReadOnlySpan\u003cchar\u003e input)\n    {\n        // displays a hint above the text input, can be empty\n        // runs whenever the input changes, so be performace aware \n    }\n\n    // optional\n    public string GetAutoCompleted(ReadOnlySpan\u003cchar\u003e input)\n    {\n        // called when tab is pressed\n        // return the completed string or empty\n    }\n}\n```\n\n## Tipps\nIf you want to run commands from this console consider using https://github.com/BarionLP/CommandSystem with https://github.com/BarionLP/UnityConsoleCommandIntegration\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarionlp%2Funityconsole","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarionlp%2Funityconsole","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarionlp%2Funityconsole/lists"}