Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cemuka/command-console
Easy to setup and use command console for unity runtime.
https://github.com/cemuka/command-console
command-line console-tool tool unity unity-asset unity-scripts unity2d unity3d unity3d-plugin
Last synced: 14 days ago
JSON representation
Easy to setup and use command console for unity runtime.
- Host: GitHub
- URL: https://github.com/cemuka/command-console
- Owner: cemuka
- Created: 2021-03-14T17:36:23.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-02-18T21:55:20.000Z (over 2 years ago)
- Last Synced: 2024-10-11T10:14:08.407Z (about 1 month ago)
- Topics: command-line, console-tool, tool, unity, unity-asset, unity-scripts, unity2d, unity3d, unity3d-plugin
- Language: C#
- Homepage:
- Size: 1.98 MB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![command-console](./images/console.gif)
### Command Console
Inspired by Quantum Console from unity asset store. It looks pretty awesome.#### Usage
Simply log any string```csharp
Console.Log("This is the way");
Console.Log("Also with text support for colors", "green");
```Just call `Initialize` to setup. It will create the command view from `Resources`.
Add your commands with `Register`.```csharp
private void Start()
{
Console.Initialize();
Console.Register("greet", Greet);
}private void Greet(string[] args)
{
if (args != null && args.Length >= 1)
{
var log = "Greetings, " + string.Join(" ", args);
Console.Log(log, "green");
}
else
{
Console.Log("Err, missing argument!");
}
}
```Easily show and hide.
```csharp
private void Update()
{
if (Input.GetKeyDown(KeyCode.DoubleQuote))
{
if(Console.IsActive)
{
Console.Hide();
}
else
{
Console.Show();
}
}
}
```### LICENSE
MIT
Cem Ugur Karacam