The current implementation of SyncVar event generation forces the user to pass a parameter to the referred function. However there are many situations when a more generalized event might be useful. For example an AppearanceChanged function which rebuilds a mesh based on multiple parameters.
I was unable to find an easy workaround for this issue. It seems the network compiler finds the first instance of a function and will ignore all others, meaning overloaded methods like the example below wont work.
[SyncVar(hook = “SyncVarEvent”)]
public short paramA;
//this param throws an error
[SyncVar(hook = “SyncVarEvent”)]
public Vector3 paramB;
public void SyncVarEvent(short param) { SyncVarEvent(); }
public void SyncVarEvent(Vector3 param) { SyncVarEvent(); }
public void SyncVarEvent()
{
}