This repository has been archived on 2025-09-28. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
rectangular/addons/godot-rapier2d/plugin.gd

13 lines
426 B
GDScript3
Raw Normal View History

2024-09-25 21:18:58 +02:00
@tool
extends EditorPlugin
func _enter_tree():
if Engine.is_editor_hint():
Engine.set_meta("Rapier2DEditorPlugin", self)
var update_tool: Node = load("res://addons/godot-rapier2d/generated/updater/download_update_panel.tscn").instantiate()
Engine.get_main_loop().root.call_deferred("add_child", update_tool)
func _exit_tree():
if Engine.has_meta("Rapier2DEditorPlugin"):
Engine.remove_meta("Rapier2DEditorPlugin")