Call SyncVar when changing variable from the synced var #213
Replies: 1 comment
-
Q&A is being removed from discussions. Please use the Discord instead. Thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
So, the setup is the following.
I have a class which contains some other variables. Something like this:
public class MySyncedClass{ public int MyVar; }
Now, I have an instance of this class, with the [SyncVar] tag. The thing is, SyncVar is not being called when I change the MyVar field in a [ServerRpc]. In my case I can't add another SyncVar to that field since it comes from an external class.
Is there any way to make it sync all the MySyncedClass even if it's manually?
Beta Was this translation helpful? Give feedback.
All reactions