You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-23 15:16:17 +00:00
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!
This commit is contained in:
18
demos/plugins/custom_node/heart_plugin.gd
Normal file
18
demos/plugins/custom_node/heart_plugin.gd
Normal file
@@ -0,0 +1,18 @@
|
||||
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")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user