- Home /
Test if variable was updated via networkView
I know there is a hack-y way of doing this (or at least I feel its hack-y).
Is there a way to test for the variable change when synching objects over the network using networkViews and RDC Mode. For example, I am sending the "state" of my units to the clients, and I want to clients to call a function when the state changes. Can this be done automatically using the setter, or do I have to compare the state every frame to its last value, or is there a simpler way of doing this?
Thanks for your help.
Answer by perchik · Jul 26, 2013 at 08:38 PM
Instead of sending the state to each client, you could use an RPC call to actually call the function on each client.
Unfortunately, I cannot do that. I am using the state on up to 600 objects all at once, all being synchronized across the network. RPC calls would use up too much bandwidth.
But you are still sending the state of the unit to each client, so you are talking to all 600 clients anyway?
There are 600 objects: 4 clients. and the state is stored as a byte
Ok. So you call a function on each of the 4 clients? I'm confused as to what your question is asking.
You have 600 objects that need to stay in sync with each other in each of the 4 clients. Does each of the 600 objects have a networkView? What does 'state' mean to you? Can you elaborate on your problem?
Your answer
![](https://koobas.hobune.stream/wayback/20220613110938im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Problem networking scene objects that reparent 0 Answers
Who can setScope on networkView 0 Answers
RPC or Synchronization ? 1 Answer
Unity RTS Networking 1 Answer
How to load all character previously in game when new player joins 0 Answers