Skip to content

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

Merged
xen2 merged 2 commits intostride3d:masterfrom
Eideren:ui_services
Feb 26, 2026
Merged

fix: Replace static FocusedElement and more proactive UI service availability#3056
xen2 merged 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
@xen2 xen2 merged commit 1c6bf9c into stride3d:master Feb 26, 2026
7 checks passed
@Eideren Eideren deleted the ui_services branch February 26, 2026 14:54
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.

2 participants