Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions addons/beehave/plugin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,36 @@ var frames: RefCounted
var _custom_types: Array[StringName] = []


func _init():
name = "BeehavePlugin"
func _enable_plugin() -> void:
add_autoload_singleton("BeehaveGlobalMetrics", "metrics/beehave_global_metrics.gd")
add_autoload_singleton("BeehaveGlobalDebugger", "debug/global_debugger.gd")

# Add project settings
if not ProjectSettings.has_setting("beehave/debugger/start_detached"):
ProjectSettings.set_setting("beehave/debugger/start_detached", false)
ProjectSettings.set_initial_value("beehave/debugger/start_detached", false)
ProjectSettings.add_property_info({
"name": "beehave/debugger/start_detached",
"type": TYPE_BOOL,
"hint": PROPERTY_HINT_NONE,
"hint_string": "If enabled, the debugger will start in a separate window"
})
ProjectSettings.add_property_info(
{
"name": "beehave/debugger/start_detached",
"type": TYPE_BOOL,
"hint": PROPERTY_HINT_NONE,
"hint_string": "If enabled, the debugger will start in a separate window"
}
)
ProjectSettings.save()

print("Beehave initialized!")


func _disable_plugin() -> void:
remove_autoload_singleton("BeehaveGlobalMetrics")
remove_autoload_singleton("BeehaveGlobalDebugger")


func _init():
name = "BeehavePlugin"


func _enter_tree() -> void:
editor_debugger = BeehaveEditorDebugger.new()
if Engine.get_version_info().minor >= 2:
Expand Down
Loading