- Home /
Why do I keep getting UNetWeaver error: GetWriteFunc recursion depth exceeded for NetworkInstanceId
Hi everyone, I spent hours today trying to figure out why I had this error, read through my code a 1000 times restored a backup of my game from yesterday, almost threw my screen out of the window. and then I finally found some explanation, so I thought I'd share it with you so your screen too doesn't end up living the old icarus dream.
There's a bug in unity 5.3.0f2 that prevents you from having more than 15 SyncVar (that's total syncvar in your whole project)
http://issuetracker.unity3d.com/issues/networkbehaviour-isnt-allowed-to-have-more-than-15-syncvars
there doesn't appear to be any kind of workaround, just have to wait for 5.3.1
Answer by jeango · Dec 14, 2015 at 03:54 PM
There's a bug in unity 5.3.0f2 that prevents you from having more than 15 attributes (SyncVar, Command, ClientCallback, ClientRPC, ...). That's not per script, its the total attributes in your whole project
http://issuetracker.unity3d.com/issues/networkbehaviour-isnt-allowed-to-have-more-than-15-syncvars
there doesn't appear to be any kind of workaround, just have to wait for 5.3.1 or roll back to a previous version of Unity (works fine with 5.2.3f1 afaik)
Answer by Hydrargent · Dec 16, 2015 at 08:34 AM
Hey guys.
It's not 15 Syncvars, it's 15 attributes.
@ for JS (@Command, for example), and [] for CS ([Command] for example).
Enjoy the waiting until 5.3.1 ^_^
indeed, i corrected the answer. Thanks for the correction.
$$anonymous$$eanwhile, I installed a previous version of unity and it works fine.