Skip to content

fix(client): correctly handle coordinate SceneUI attachment#8

Open
AnrokX wants to merge 1 commit intohytopiagg:mainfrom
AnrokX:fix/sceneui-coordinate-hook-client
Open

fix(client): correctly handle coordinate SceneUI attachment#8
AnrokX wants to merge 1 commit intohytopiagg:mainfrom
AnrokX:fix/sceneui-coordinate-hook-client

Conversation

@AnrokX
Copy link
Copy Markdown

@AnrokX AnrokX commented Mar 3, 2026

Summary

  • Mark coordinate-based SceneUI instances for an initial position sync when they are created on the client.
  • Clear any prior entity attachment when SceneUI.setPosition(...) is used, keeping attachment modes mutually exclusive.

Notes

  • Added a follow-up PR comment in the fork PR describing a pending-template edge case and concise fix direction.

Testing

  • Manual local validation from the original PR:
    • SceneUI renders and remains hooked to the configured world coordinate.

@AnrokX
Copy link
Copy Markdown
Author

AnrokX commented Mar 3, 2026

Edge case: while SceneUI is pending template registration, merge logic drops undefined fields. That can lose the detach signal (attachedToEntityId = undefined) when switching to position, so it may still instantiate in entity-attached mode.

Minimal fix: in pending merge, treat position and attachedToEntityId as mutually exclusive and clear the opposite field when one is set.

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