Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | AlexIva |
Hello everyone!
I am trying to create custom CheckBox using this article Создание плагинов — Документация Godot Engine (4.x) на русском языке
I have created a file res://addons/rgCheckBox/rgCheckBox.gd:
tool
extends CheckBox
class_name rgCheckBox
func _ready():
pass
I have created a file res://addons/rgCheckBox/custom_node.gd:
tool
extends EditorPlugin
func _enter_tree():
add_custom_type("rgCheckBox", "CheckBox", preload("rgCheckBox.gd"), preload("icon.png"))
func _exit_tree():
remove_custom_type("rgCheckBox")
The problems:
- I can not see rgChechBox in Editor control list
- When I try to enable this custom component in [Project] > [Project Settings…] > [Plugins] then I get the message
Unable to load addon script from path: 'res://addons/rgCheckBox/rgCheckBox.gd' Base type is not EditorPlugin.
As I understand in Godot script multiple inheritance is not supported (or is supported but I did not find this syntax) - so how can I inherit my custom component from EditorPlugin and standard UI component in the same time? Or what am I generally doing wrong?
Thanks in advance