Automatically generate user-friendly lookups of project layer names. Each layer will have its layer number and its bit available from the Enum
func _ready() -> void:
var render_layer_number = LayerNames.RENDER_2D.LAYER_8_NUM # 8
var render_layer_bit = LayerNames.RENDER_2D.LAYER_8_BIT # 128
public override void _Ready()
{
var render_layer_number = (int)LayerNames.RENDER_2D.LAYER_8_NUM; // 8
var render_layer_bit = (int)LayerNames.RENDER_2D.LAYER_8_BIT; // 128
}
The plugin supports generating enums in multiple languages. You can configure the output format in:
Project
-> Project Settings
-> addons/project_layer_names/output
Options:
- GDScript (default): Generate only GDScript enums
- C#: Generate only C# enums
- Both: Generate both GDScript and C# enums

Copy the addons/layerNames
directory into your res://addons/
directory, or install via the Asset Library
Go to Project
-> Project Settings
-> Plugins
and enable Layer Names
.
Licensed under the MIT license