Skip to content

Chutpot/UnityNuklearConsolePackage

Repository files navigation

Unity Nuklear Console

  • Developer console for Editor and Development builds. Toggle Console with "~".

Installation

Unity does not support custom package dependencies so we need to add dependencies manually.


Usage

  • Simply toggle console after Installation, the console is going to initialize itsef automaticaly.

Adding Commands

  • To add static commands use Attribute [ConsoleCommand(string commandName, string explanation)]
  • Any non-static commands with attributes will be ignored!
#if UNITY_EDITOR || DEVELOPMENT_BUILD
    [ConsoleCommand("examplecommand", "Example command explanation")]
    public static void ExampleCommand()
    {
        Chutpot.Nuklear.Console.Console.Log("this is a example command");
    }

    [ConsoleCommand("intcommand", "Int command explanation")]
    public static void IntCommand(int x)
    {
        Chutpot.Nuklear.Console.Console.Log("int parameter:" + x);
    }
#endif
  • Non-static Commands
    private void Awake()
    {
#if UNITY_EDITOR || DEVELOPMENT_BUILD
        Chutpot.Nuklear.Console.Console.AddCommand("nonstaticcommand", NonStaticCommand);
#endif
    }

    private void OnDestroy()
    {
#if UNITY_EDITOR || DEVELOPMENT_BUILD
        Chutpot.Nuklear.Console.Console.RemoveCommand("nonstaticcommand");
#endif        
    }

    private void NonStaticCommand() 
    {
    
    }

Support

Input System
Legacy ✔️
New Input System ✔️

TODO

  • Better Parser
  • Console Settings

Screenshots

Screenshot

About

No description, website, or topics provided.

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages