diff --git a/ovr-utils/overlay_manager.gd b/ovr-utils/overlay_manager.gd index aaf84e7..a6a36ca 100644 --- a/ovr-utils/overlay_manager.gd +++ b/ovr-utils/overlay_manager.gd @@ -27,16 +27,8 @@ func _load_overlays(): func add_overlay(name): print("Adding overlay '", name, "'") -# var scene = load("res://overlays/" + type + ".tscn") -# if not scene: -# print("Unknown overlay type: '", type, "'") -# scene = load("res://special_overlays/UnknownType.tscn") - var instance = preload("res://addons/openvr_overlay/OverlayInstance.tscn").instance() - instance.name = name -# instance.overlay_scene = scene -# instance.type = type instance.add_child(preload("res://OverlaySettingsSync.tscn").instance()) add_child(instance) emit_signal("added_overlay", name) diff --git a/ovr-utils/overlay_settings_sync.gd b/ovr-utils/overlay_settings_sync.gd index dd965ad..8e714ff 100644 --- a/ovr-utils/overlay_settings_sync.gd +++ b/ovr-utils/overlay_settings_sync.gd @@ -1,10 +1,10 @@ extends Node - onready var p = get_parent() var loaded := false var _needs_sync := true + func _ready() -> void: p = get_parent() call_deferred("load_all")