heart_plugin.gd 372 B

12345678910111213
  1. @tool
  2. extends EditorPlugin
  3. func _enter_tree() -> void:
  4. # When this plugin node enters tree, add the custom type.
  5. add_custom_type("Heart", "Node2D", preload("res://addons/custom_node/heart.gd"), preload("res://addons/custom_node/heart_icon.png"))
  6. func _exit_tree() -> void:
  7. # When the plugin node exits the tree, remove the custom type.
  8. remove_custom_type("Heart")