FishNet
FishNet copied to clipboard
Setting a SyncVar's field and using Dirty doesn't correctly update the SyncVar
General Unity version: 2022.3.16f1 Fish-Networking version: 4.1.4R Pro Discord link: https://discord.com/channels/424284635074134018/966848379298652200/1221825451786375172
Description Setting a field on a class that is a SyncVar and then calling Dirty on the SyncVar does not invoke the OnChange method for the server, and it does not set that value for new observers.
Replication Steps to reproduce the behavior:
- Import the sample and open the scene
- Press play and see how the OnChange method isn't invoked
- Launch another client and see how the SyncVar isn't updated for the new observing client
Expected behavior
I would expect it to be synced properly when using Dirty
Example SyncVarBug.zip