godot_openvr
godot_openvr copied to clipboard
Crash if OpenVRConfig isn't instantiated in Godot first
This is not by design :)
Found out on stream yesterday that if OpenVRConfig isn't initialized within Godot first that the engine crashes, presumably because certain default values aren't set up as the underlying singleton should be created even if the GDNative object isn't.
Workaround for now is to make sure you execute:
var openvr_config = preload("res://addons/godot-openvr/OpenVRConfig.gdns");
if openvr_config:
print("Setup configuration")
openvr_config = openvr_config.new()
before arvr_interface.initialize() is run.
Yes, actually now that OpenVRConfig does more, we'd want to instantiate it anyway all the time.
Indeed, which is why I never ran into this before but I guess we can't guarantee its instantiated.
Haven't found the cause yet though