I was trying out the new Unity networking and I added the SyncVar attribute to one of my variables to be synced. I also have a property to get/set the variable and update the visuals when set. I set the "hook" variable in the SyncVar so the property is used and visuals are updated properly (or that was the idea, since it gives an error :P)
[SyncVar(hook = "set_Tapped")]
private bool _tapped;
public bool Tapped
{
get { return _tapped; }
set { _tapped = value; UpdateRotation(); }
}
Now however I get an error in the console:
UNetWeaver warning: SyncVar [_tapped] set from within property function [System.Void Card::set_Tapped(System.Boolean)]. This will not set dirty flags.
How should this be handled? I could just make a set method myself (not using properties), but is there a better/nicer way?
Thanks!