tool extends EditorPlugin var yarn_spinner_importer func _enter_tree(): yarn_spinner_importer = preload("yarn_spinner_importer.gd").new() add_custom_type("YarnScript", "Resource", preload("yarn_script.gd"), preload("icon.png")) add_custom_type("YarnRunnerNode", "Node", preload("yarn_runner_node.gd"), preload("icon.png")) add_import_plugin(yarn_spinner_importer) func _exit_tree(): remove_custom_type("YarnScript") remove_custom_type("YarnRunnerNode") remove_import_plugin(yarn_spinner_importer) yarn_spinner_importer = null