├── addons └── screen_debugger │ ├── screen.scn │ ├── plugin.cfg │ ├── ScreenDebugger.gd │ └── S_ScreenDebugger.gd ├── .gitignore ├── README.md └── LICENSE /addons/screen_debugger/screen.scn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nonunknown/screen-debugger/HEAD/addons/screen_debugger/screen.scn -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Godot-specific ignores 3 | .import/ 4 | export.cfg 5 | export_presets.cfg 6 | 7 | # Mono-specific ignores 8 | .mono/ 9 | data_*/ 10 | -------------------------------------------------------------------------------- /addons/screen_debugger/plugin.cfg: -------------------------------------------------------------------------------- 1 | [plugin] 2 | 3 | name="ScreenDebugger" 4 | description="Show your variables on screen" 5 | author="nonunknown" 6 | version="1.0" 7 | script="ScreenDebugger.gd" 8 | -------------------------------------------------------------------------------- /addons/screen_debugger/ScreenDebugger.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends EditorPlugin 3 | 4 | 5 | func _enter_tree(): 6 | add_autoload_singleton("ScreenDebugger","res://addons/screen_debugger/S_ScreenDebugger.gd"); 7 | print("ADDED ScreenDebugger") 8 | pass 9 | 10 | 11 | func _exit_tree(): 12 | remove_autoload_singleton("ScreenDebugger"); 13 | print("REMOVED ScreenDebugger") 14 | pass 15 | -------------------------------------------------------------------------------- /addons/screen_debugger/S_ScreenDebugger.gd: -------------------------------------------------------------------------------- 1 | extends Node 2 | 3 | var _scn:PackedScene = preload("res://addons/screen_debugger/screen.scn") 4 | var dict:Dictionary = {} 5 | var label:Label 6 | func _ready(): 7 | var inst = _scn.instance() 8 | get_tree().root.call_deferred("add_child",inst) 9 | label = inst.get_node("Panel/Label") 10 | 11 | func _process(delta): 12 | label.text = str(dict) 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Screen Debugger 2 | 3 | This is a plugin which enables the user to show their variables in-game. You can see the variables changing on-screen instead of printing them into console... 4 | 5 | ## Plugin in action 6 | [![Plugin in action](http://img.youtube.com/vi/F_sUpE7E0Tc/0.jpg)](http://www.youtube.com/watch?v=F_sUpE7E0Tc) 7 | 8 | ## How to use 9 | 10 | * Enable the plugin 11 | * Make sure the singleton is the first one in the list 12 | * In any script at "process" function type: 13 | ``` 14 | var life:int = 10 15 | _process(delta): 16 | #ScreenDebugger Singleton Class / dict > The dictionary which holds all variables 17 | #Make sure to use unique name for the dict["UniqueNameHere"] identification of the var 18 | ScreenDebugger.dict["Life"] = life 19 | 20 | ``` 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 nonunknown 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | --------------------------------------------------------------------------------