Syncvar hook to override function

I just found that if I setup the [SyncVar(hook=“basefun”)] in a networkbehaviour class: “baseclass”, and override the “basefun” in the class derived from “baseclass”. The override fun is not automatically hooked to SyncVar change. It seems that SyncVar only hook the function defined in the base class in which SyncVar is also defined.

I am wondering if anyone has encountered the same problem, and if there are something that I missed?

If you call another function inside your basefun and override the new function it seems to work.

int x;

void basefun(int x){
     this.x = anotherfun(x);

protected virtual int anotherfun(int x){
     return x;

In derived class

protected override int anotherfun(int x){
     //do stuff
     return base.anotherfun(x);

May not be the cleanest method but I hope it helps. Let me know if you found a better way.