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

Use Engine::get_singleton()->register_singleton(...) to register singletons for the OpenXR extension wrappers #72

Closed

Conversation

m4gr3d
Copy link
Collaborator

@m4gr3d m4gr3d commented Jan 12, 2024

No description provided.

@m4gr3d m4gr3d added this to the 2.0.3 milestone Jan 12, 2024
@m4gr3d m4gr3d requested a review from dsnopek January 12, 2024 16:28
@m4gr3d m4gr3d changed the title Use Engine::get_singleton()->register_singleton(...) to register si… Use Engine::get_singleton()->register_singleton(...) to register singletons for the OpenXR extension wrappers Jan 12, 2024
…ngletons for the OpenXR extension wrappers.
@m4gr3d m4gr3d force-pushed the fix_extension_singleton_registration branch from eb6d98e to 54e3fea Compare January 12, 2024 20:56
@@ -10,7 +10,7 @@ func _ready():
var vp: Viewport = get_viewport()
vp.use_xr = true

scene_capture = OpenXRFbSceneCaptureExtensionWrapper.get_singleton()
scene_capture = Engine.get_singleton("OpenXRFbSceneCaptureExtensionWrapper")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need to do the Engine.get_singleton() bit, in GDScript all singletons should be available like globals, ie OpenXRFbSceneCaptureExtensionWrapper.request_scene_capture() should work to call that method. Although, I would also have expected Engine.get_singleton() to work too...

@m4gr3d
Copy link
Collaborator Author

m4gr3d commented Jan 16, 2024

Superseded by #73

@m4gr3d m4gr3d closed this Jan 16, 2024
@m4gr3d m4gr3d deleted the fix_extension_singleton_registration branch January 16, 2024 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants