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

Change detection/replication doesn't work on replication-group children #660

Open
treytencarey opened this issue Oct 4, 2024 · 2 comments
Labels
A-Replication C-Bug Something isn't working

Comments

@treytencarey
Copy link

Initially I had a PlayerText(String) component on my PlayerBundle.
I set a timer for 5 seconds that changes PlayerText, and on the client I listen for Changed<PlayerText> and updated the text. This worked fine.
But now I wanted to make this a separate bundle, PlayerTextBundle. I still see the timer completes, but the client no longer receives the changed value.

Here's a sample project:
https://github.com/treytencarey/placeholder_interest_group_management

  • Start the server and client. Notice the client has text "Server should change this..." (comes from protocol.rs)
  • After 5 seconds, notice the server says "Timer complete". The code updates the PlayerText. (comes from server.rs)
  • Notice the client never receives Changed. (in client.rs)
  • I have verified that without using groups, change detection/replication works as expected.
@cBournhonesque
Copy link
Owner

That's pretty surprising; so you're saying that normal replication (even without interest management) is broken when using replication groups?

@cBournhonesque cBournhonesque added A-Replication C-Bug Something isn't working labels Oct 4, 2024
@treytencarey
Copy link
Author

Yes. After some further investigation, if I have a PlayerText component string

#[derive(Component, Serialize, Deserialize, Clone, Debug, PartialEq)]
pub struct PlayerText(pub String);

On my parent (PlayerBundle), the client picks up the changes when my server sets a different PlayerText value.
On my child (PlayerTextBundle), the client won't get the change.

Here's an example of the replication working, where I put PlayerText on both the PlayerBundle and PlayerTextBundle -- the client picks up the changes as I'd expect.
https://github.com/treytencarey/placeholder_interest_group_management/pull/1/files
But if I just want the PlayerText on the PlayerTextBundle (remove from PlayerBundle) replication of the PlayerText value stops working.

Hopefully this clarifies the issue a bit better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Replication C-Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants