system
1
|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
patatra |
Hi everyone,
I am writing an Addon based on GraphEdit. I wanted my GraphNodes to have some common elements. I followed this post.
Extends a custom script
In the case of an Addon there are things to do with the Plugin.gd file?
system
2
|
|
|
|
Reply From: |
yosoyaquel |
Yes, you must to add your custom type on enter_tree and remove on exit_tree. Something like this:
tool extends GraphEdit
func _enter_tree():
add_custom_type( "Name", "GraphEdit", preload("my_code.gd"), preload("my_icon.png))
func _exit_tree():
remove_custom_type("Name")
Thank you for your answer, But in my case, I would only want to have the script not the node.
Good Day,
patatra | 2022-10-22 14:12