Tested versions
- Reproduced in 4.6.beta2
- Reproduced in 4.6.beta1
- Reproduced in 4.6.dev6
- Reproduced in 4.6.dev5
- NOT reproduced in 4.6.dev4 (example works here)
- NOT reproduced in 4.6.dev3 (example works here)
- NOT reproduced in 4.5.1-stable (example works here)
System information
Godot v4.6.beta2 - Windows 10 (build 19045) - Multi-window, 2 monitors - OpenGL 3 (Compatibility) - NVIDIA GeForce 940MX (NVIDIA; 32.0.15.6636) - Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz (4 threads) - 15.86 GiB memory
Issue description
The inspector/editor won't create nodes from add_custom_type even using the steps in https://docs.godotengine.org/en/latest/tutorials/plugins/editor/making_plugins.html#a-custom-node -- it seems to require class)_name of the exact same name as add_custom_type.
Steps to reproduce
Minimal reproduction project (MRP)
plugin_test_2025-12-26_10-52-31.zip
Key code areas:
func _enter_tree() -> void:
# The exampole (an anonymouse class) doesn't work.
add_custom_type(
"MyButton",
"Button",
preload("my_button.gd"),
preload("res://icon.svg")
)
# Having the name == class_name works, but defeat's add_custom_type's
# purpose.
add_custom_type(
"NamedMyButton",
"Button",
preload("named_my_button.gd"),
preload("res://icon.svg")
)
# Using add_custom_type to provide aliases also doesn't work.
add_custom_type(
"AltNamedMyButton",
"Button",
preload("alt_named_my_button.gd"),
preload("res://icon.svg")
)
my_button.gd (from Godot docs example):
@tool
extends Button
func _enter_tree():
pressed.connect(clicked)
func clicked():
print("You clicked me!")
named_my_button.gd (with class_name makes inspector allow Create):
@tool
class_name NamedMyButton extends Button
func _enter_tree():
pressed.connect(clicked)
func clicked():
print("You clicked me!")
alt_named_my_button.gd:
@tool
class_name XNamedMyButton extends Button
func _enter_tree():
pressed.connect(clicked)
func clicked():
print("You clicked me!")
Tested versions
System information
Godot v4.6.beta2 - Windows 10 (build 19045) - Multi-window, 2 monitors - OpenGL 3 (Compatibility) - NVIDIA GeForce 940MX (NVIDIA; 32.0.15.6636) - Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz (4 threads) - 15.86 GiB memory
Issue description
The inspector/editor won't create nodes from add_custom_type even using the steps in https://docs.godotengine.org/en/latest/tutorials/plugins/editor/making_plugins.html#a-custom-node -- it seems to require class)_name of the exact same name as add_custom_type.
Steps to reproduce
Result:
Expected Result:
Adding a class_name in my_button.gd of the exact name allows the node to be created, but this seems to defeat the purpose of add_custom_type.
Minimal reproduction project (MRP)
plugin_test_2025-12-26_10-52-31.zip
Key code areas:
my_button.gd (from Godot docs example):
named_my_button.gd (with class_name makes inspector allow Create):
alt_named_my_button.gd: