mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-06 16:00:08 +01:00
Refactor the plugin demos to be inside of a project for convenience
This commit is contained in:
11
plugins/addons/custom_node/heart_plugin.gd
Normal file
11
plugins/addons/custom_node/heart_plugin.gd
Normal file
@@ -0,0 +1,11 @@
|
||||
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