Skip to content

feat: late-added UI siblings render on top (matching Unity)#693

Draft
robtfm wants to merge 1 commit intomainfrom
feat/ui-creation-order
Draft

feat: late-added UI siblings render on top (matching Unity)#693
robtfm wants to merge 1 commit intomainfrom
feat/ui-creation-order

Conversation

@robtfm
Copy link
Copy Markdown
Collaborator

@robtfm robtfm commented Mar 26, 2026

Summary

  • Stamps scene UI entities with a UiCreationOrder component (using Bevy's FrameCount) when their UiTransform is first processed
  • Sorts siblings by (creation_frame, scene_id) so late-added entities are processed last and their ChildOf is inserted last (rendering on top)
  • Skips rightOf blocking when the target was created in a later frame, preventing late-added entities from reordering existing siblings

Pending clarification of whether the reference client will fix this or maintain it as intended behaviour.

🤖 Generated with Claude Code

Stamp scene UI entities with a UiCreationOrder component using Bevy's
FrameCount when first created. Sort siblings by (creation_frame, scene_id)
and skip rightOf blocking for targets created in a later frame, so that
late-added entities render on top of existing siblings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant