Skip to content

fix: Replace static FocusedElement and more proactive UI service availability#3056

Open
Eideren wants to merge 2 commits intostride3d:masterfrom
Eideren:ui_services
Open

fix: Replace static FocusedElement and more proactive UI service availability#3056
Eideren wants to merge 2 commits intostride3d:masterfrom
Eideren:ui_services

Conversation

@Eideren
Copy link
Collaborator

@Eideren Eideren commented Feb 6, 2026

PR Details

FocusedElement is a static field that is mutated throughout the lifetime of the program, two game instances may unknowingly fight over said field, using it as if it came from them. Which will ultimately throw, or at the very least cause unexpected issues through race-conditions between the two game instances.

Refactored the way in which the service registry is delivered to UI, providing users with the ability to enable a UI element as soon as it is added to the scene instead of after the first draw.

Related Issue

None

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

@Eideren Eideren added the area-UI label Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant