Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Networking New UNetWeaver error

Discussion in '5.3 Beta' started by brianturner, Nov 30, 2015.

  1. brianturner

    brianturner

    Joined:
    Dec 1, 2013
    Posts:
    9
    I have a project using UNET fairly extensively. It works great in both 5.1 and 5.2.

    Opening the project in 5.3.0f2 produces the following weaver error:

    ^^ I inserted spaces after a couple colons to prevent smilies.

    I checked the source of `NetworkInstanceId` at https://bitbucket.org/Unity-Technol...anceId.cs?at=5.2&fileviewer=file-view-default and didn't see anything suspect, albeit that is the source for 5.2.

    Interestingly, I can't reproduce it by writing scripts in a new project. Did something change? Or should I look at something else?
     
  2. seanr

    seanr

    Unity Technologies

    Joined:
    Sep 22, 2014
    Posts:
    669
    Look at the editor log file for more details.
     
  3. JK_uno

    JK_uno

    Joined:
    Oct 30, 2014
    Posts:
    4
    Hi folks I've got more info on this one.

    After trying to port my existing project to the 5.3.0f2 beta I got the same error as posted by brianturner.
    Investigations found that if you have >= 16 syncvars (and possibly any networking tag e.g. [SyncVar], [Command], [ClientRpc]) you get this error. The recursion depth error will specify the type of whatever that sixteenth thing was that was trying to be serialized.

    I've attached a script that is just a NetworkBehaviour with 16 public [SynchVars] in it. Add it to your project and you'll get the above error. Comment out any SyncVar tag and it'll compile.

    Hope this helps,
    Jas

    @seanr - please see bug in the Issue Tracker: Case 749253
     

    Attached Files:

    sanpats likes this.
  4. seanr

    seanr

    Unity Technologies

    Joined:
    Sep 22, 2014
    Posts:
    669
    Thanks for the report and repro case.
     
  5. brianturner

    brianturner

    Joined:
    Dec 1, 2013
    Posts:
    9
    I removed all SyncVar, Command, and ClientRpc tags from several of my classes and the error disappeared. Removing SyncVars from my classes was not enough.

    Although the error is gone, obviously the project's networking won't work.
     
  6. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,180
    I find the weaver throws a fit whenever there's something silly i've done (ie lack of meaningful error messages)
     
  7. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    318
    I'm getting an error like this in a class with no SyncVars. I commented out the 4 rpc's it complains about, and the error goes away. I then uncommented one of the rpcs and commented out its method body, still get the error. If I comment out the 2 integer parameters, the error goes away.
     
    Last edited: Dec 2, 2015