Skip to content

VolodyaKEK/GodotConsole

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GodotConsole

Alt text

Features

  • Everything contained in single file Console.gd
  • Easy integration in an existing project
  • Easy command creation
  • History navigation (ui_up and ui_down by default)

How to use

  • Add script Console.gd in your project
  • Add Console.gd as autoload
  • Add Console.connect_node(self) in _ready on nodes which have acceptable commands (or just connect them with Console.connect_node(node) from anywhere)
  • To popup console you need to setup input action console (can be changed by setting Console.input_action property)

Acceptable command example

An acceptable command is any function with "_cmd" at the end. Postfix can be changed by setting the Console.command_postfix property to any string.

func _ready():
	Console.connect_node(self);

var cmdname_desc = "Text printed when using help for this command (help cmdname)"; #Optional
var cmdname_help = "Text printed when using 'help' command"; #Optional
func cmdname_cmd(arg0, arg1):
	#arg0 and arg1 is an arguments provided after command,
	#there can be any number of arguments
	Console.print("Command output");

About

Single File Runtime Console for Godot Engine

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published