{"repo":"game-gems/godot-const-generator","free":true,"listed":false,"github":"https://github.com/game-gems/godot-const-generator","clone":"git clone https://github.com/game-gems/godot-const-generator.git","description":"A Godot addon that generates GDScript classes with constants for all important string-referenced elements of a project","language":"GDScript","stars":20,"topics":["codegen","gdscript","godot"],"license":null,"category":"game-templates","readme_excerpt":"About Const Generator generates GDScript files with constants for many things that are usually accessed by plain strings: - ProjectFiles class: res:// paths to all relevant files in your project - Groups class: scene tree groups - InputActions class: input actions - Physics/Render/Navigation2D(3D) and Avoidance classes: physics/render/navigation/avoidance layers So that in your code you use: - preload(ProjectFiles.Scenes.ENEMY) instead of preload(\"res://scenes/enemy/enemy.tscn\") - node.is in group(Groups.PLAYER) instead of node.is in group(\"player\") - node.set collision layer value(Physics2D.Layer.COINS, true) instead of node.set collision layer value(2, true) Benefits: - Moving files won't break your project or add irrelevant changes to your diffs/commits. - Illegal reference errors are prevented at build/dev time, since you reference constants and not arbitrary strings. Configurable (in addons/const generator/const generator.gd ) Pretty much everything can be configured by changing the code: - Project scan frequency (default: every 5 seconds). - Generated class' names and file extensions they're mapped to. - Files/directories can be excluded from scanning (default: the addons directory) Example The following project structure would yield Additional information 1. Names of constants in the generated file are SCREAMING SNAKE CASE'd project file's names, so they have to be unique. 2. This plugin periodically scans the whole project. This may have implications for large project","default_branch":null,"files":null,"tree":[],"storefront":"/r/game-gems","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/game-gems/godot-const-generator/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}