godot/demos/plugins/custom_node/heart_plugin.gd
Juan Linietsky 6fc1c3a4d1 Completed the support for plugins! It is not possible to add plugins.
Not all APIs are provided yet, please request whathever you are missing.
Some example plugins are provided in demos/plugins. Just copy them to a folder in your project named addons/ and then enable them from the project settings.
Have fun!
2016-02-27 23:12:27 -03:00

18 lines
356 B
GDScript

tool
extends EditorPlugin
func _enter_tree():
# When this plugin node enters tree, add the custom type
add_custom_type("Heart","Node2D",preload("res://addons/custom_node/heart.gd"),preload("res://addons/custom_node/heart_icon.png"))
func _exit_tree():
# When the plugin node exits the tree, remove the custom type
remove_custom_type("Heart")