Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text doesn't update when text() is updated via set_component #113

Closed
SK83RJOSH opened this issue Feb 18, 2023 · 5 comments
Closed

Text doesn't update when text() is updated via set_component #113

SK83RJOSH opened this issue Feb 18, 2023 · 5 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@SK83RJOSH
Copy link
Contributor

I'm trying to update the text in response to the number of strokes changing in the minigolf gamemode. Unfortunately it doesn't seem to work.

@SK83RJOSH SK83RJOSH added the bug Something isn't working label Feb 18, 2023
@SK83RJOSH SK83RJOSH changed the title Text Doesn't Update When text() Changes Text doesn't update when text() is updated via set_component Feb 19, 2023
@SK83RJOSH SK83RJOSH added the enhancement New feature or request label Feb 19, 2023
@SK83RJOSH
Copy link
Contributor Author

SK83RJOSH commented Feb 19, 2023

Quick update on this issue, the text is updated for clients that join after it's been changed. The system for updating the mesh() is ran on the server with the new string but the mesh doesn't update.

@philpax
Copy link
Contributor

philpax commented Feb 20, 2023

Other debugging notes: the relevant systems do run, but the GPU isn't updated?

@SK83RJOSH
Copy link
Contributor Author

Seems to be the case; I couldn't debug much further but at the very least the mesh component seemed to be updated.

@MischaU8
Copy link

For the minigolf example the player user_id label gets mangled after a couple shots. This happens both for the local player as well for others joining the game. This behavior seems related to the text update, since it doesn't happen when I comment out line https://github.com/AmbientRun/Ambient/blob/main/guest/rust/examples/minigolf/src/lib.rs#L355

entity::set_component(player_text, text(), stroke_count.to_string());

Screenshot 2023-02-28 at 11 45 26

Ambient 0.1.1 installed via git on OSX (M1)

@philpax
Copy link
Contributor

philpax commented Feb 28, 2023

Ah thanks, that's a semi-known issue. I've just created an issue to track it 😅

MavethGH pushed a commit to MavethGH/Ambient that referenced this issue Mar 18, 2023
philpax pushed a commit that referenced this issue May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants