Skip to content

AustinSmith13/UConsole

Repository files navigation

UConsole

A simple in-game console for unity.

How to use

Add the UConsole project files to the asset folder. Add the ConsoleGui Monobehavior to any gameobject in your scene and thats it.

Creating custom commands

You can create a custom command by calling the static method ConsoleCommandDatabase.RegisterCommand. Give it a name, description, and callback for your command.

ConsoleCommandDatabase.RegisterCommand("MYCOMMAND", "Does something", MyCallBack);

string MyCallBack(params string[] args) {
  // Does something
}

or

using UConsole;

namespace UConsole.Commands
{
   [UConsole.Command("MyCommand", "My Commands description.", "[usage])]
   public class MyCommand : ICommand
   {
      public string Execute(params string[] args)
      {
         return "Hello world!"
      }
   }
}

Any and all ICommands within the calling assembly will automaticly be registered to UConsole at runtime.

About

A simple in-game console for Unity3D.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages