Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash if OpenVRConfig isn't instantiated in Godot first #109

Open
BastiaanOlij opened this issue Oct 31, 2020 · 2 comments
Open

Crash if OpenVRConfig isn't instantiated in Godot first #109

BastiaanOlij opened this issue Oct 31, 2020 · 2 comments
Labels

Comments

@BastiaanOlij
Copy link
Member

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.

@beniwtv
Copy link
Collaborator

beniwtv commented Nov 15, 2020

Yes, actually now that OpenVRConfig does more, we'd want to instantiate it anyway all the time.

@BastiaanOlij
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants