This is a simple code generation Godot plugin, which generates onready var <node_name>: <node_type> = $"<node_path>
declarations for each selected node.
- Download this repository and add its
addons
contents to youraddons
project folder. - Activate VarGen in Project > Project Settings > Plugins
- Once activated, look for VarGen dock with a button (bottom-right dock slot by default).
- Select one or more nodes in you scene explorer.
- Press the vargen button.
The script will create an onready var
statement for each selected node, and insert them into the root node's script. Check the output for errors if nothing happens.
⚠️ This script modifies actual script files on the filesystem, unsaved changes might be lost.⚠️ This script uses an undocumented API to reload scripts in the editor.
- 🎨 icon_GUI_tree_arrow_right.svg and icon_GUI_tree_arrow_down.svg from Godot editor sources.