VarGen

An asset by dmitriy_shmilo
The page banner background of a mountain and forest
VarGen thumbnail image
VarGen thumbnail image
VarGen hero image

Quick Information

0 ratings
VarGen icon image
dmitriy_shmilo
VarGen

A small code generation tool, which inserts `onready var` statements for the selected nodes into a root node script. Works for GDScript and C#.

Supported Engine Version
3.4
Version String
1
License Version
MIT
Support Level
community
Modified Date
1 year ago
Git URL
Issue URL

godot-vargen

This is a simple code generation Godot plugin, which generates onready var <node_name>: <node_type> = $"<node_path> declarations for each selected node.

Installation

  1. Download this repository and add its addons contents to your addons project folder.
  2. Activate VarGen in Project > Project Settings > Plugins

Usage

  1. Once activated, look for VarGen dock with a button (bottom-right dock slot by default).
  2. Select one or more nodes in you scene explorer.
  3. 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.

Important

  • ⚠️ 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.

Credits

A small code generation tool, which inserts `onready var` statements for the selected nodes into a root node script. Works for GDScript and C#.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
VarGen icon image
dmitriy_shmilo
VarGen

A small code generation tool, which inserts `onready var` statements for the selected nodes into a root node script. Works for GDScript and C#.

Supported Engine Version
3.4
Version String
1
License Version
MIT
Support Level
community
Modified Date
1 year ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers