GithubHelp home page GithubHelp logo

godot-debug-console's Introduction

Source like console for Godot

Usage

Console

Console is a control that can be dragged into a scene.

it can be dragged in runtime by clicking on the panel and dragging it to the desired location.

it can be resized by middle click dragging the panel

Variables

declare a variable of type ConsoleVar and call ConsoleVar.create(key, default_value)

var my_int = ConsoleVar.create("my_var", 0)
var my_float = ConsoleVar.create("my_float", 0.0)
var my_string = ConsoleVar.create("my_string", "Hello, World!")
var my_bool = ConsoleVar.create("my_bool", false)

# values can be accessed like this
print(my_int.data)
print(my_float.data)
print(my_string.data)
print(my_bool.data)

it can be used for enums as well, however it will only accept ints as values

enum MyEnum {ONE, TWO, THREE}
var my_enum = ConsoleVar.create("my_enum", ONE as int)

# values can be accessed like this
print(my_enum.data as MyEnum)

in the console you can access the variables by typing their key and the value you want to set them to or just the key to display its current value.

$ my_int 5
my_int: 5
$ my_int
5
$ my_float 3.14
my_float: 3.14

Strings can be set with or without quotes

my_string "Hello, Godot!"
my_string: Hello, Godot!

Installation

  1. Clone this repository or download the zip and extract it
  2. Copy the addons folder to your project folder

Tested on Godot 4.2.1 llvm static wayland build commit fe01776

godot-debug-console's People

Contributors

nullctipus avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.