Skip to content

Expose new T5Manager signal enabling glasses events to be cancelled - #77

Open
Jonathan-Stevens wants to merge 1 commit into
GodotVR:mainfrom
Jonathan-Stevens:upstream/glasses-skip-incoming-connection
Open

Expose new T5Manager signal enabling glasses events to be cancelled#77
Jonathan-Stevens wants to merge 1 commit into
GodotVR:mainfrom
Jonathan-Stevens:upstream/glasses-skip-incoming-connection

Conversation

@Jonathan-Stevens

Copy link
Copy Markdown
Contributor

This change adds a signal to T5Manager that fires when evaluating new glasses in ShouldUseGlasses().
Scripts that subscribe to this event can observe the glasses ID of an incoming pair of glasses and opt to cancel the connection attempt. This is useful for applications that might want to restrict/vary the number of glasses they support or otherwise ignore a specific glasses ID.

@patrickdown

Copy link
Copy Markdown
Collaborator

Would you mind rebasing these changes onto the current main so that the github CI can run?

@Jonathan-Stevens
Jonathan-Stevens force-pushed the upstream/glasses-skip-incoming-connection branch from 4d9f8f3 to 03ca9f6 Compare October 7, 2025 20:24
xr_rig.queue_free()


class CancellableGlassesEventArgs extends Object:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This should probably extend RefCounted instead of Object

@patrickdown

patrickdown commented Oct 14, 2025

Copy link
Copy Markdown
Collaborator

So, this is my fault for not making good documentation for this but the way I originally intended for this to be handled was for the user to derive their own T5Manager subclass. So the user would just create there own subclass and override ShouldUseGlasses.

This use of Signal in this case is a little odd since they are multi cast. They are generally used to tell other parts of the system about an event but not generally to pass back information.

I think there are good things which could be added to the default T5Manger. For example an numeric field that allows the user to select the maximum number of glasses that are allowed to connect. A string array could also be added to hold the glasses IDs that could be allowed to connect or the preferred order.

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