Search Unity

Syncvar Array, UNetWeaver error

Discussion in 'UNet' started by BlingBling-Bob, Sep 23, 2015.

  1. BlingBling-Bob

    BlingBling-Bob

    Joined:
    Jul 7, 2015
    Posts:
    1
    Hi there,

    After upgrading to 5.2.1f, I got some problems with Syncvar-Arrays of primitive types (like int, string, …).
    Worked flawlessly in unity 5.1 though.


    The code is basically:

    Code (CSharp):
    1. using UnityEngine;
    2. using HeikoGames.WeaponSystem.FireArms;
    3. using UnityEngine.Networking;
    4.  
    5. namespace HeikoGames.ItemSystem
    6. {
    7.  
    8.   public class EquipMgr : MyNetworBehaviour
    9.  
    10.       {
    11.  
    12.           …
    13.           [SyncVar] public int[] testArray;
    14.           [SyncVar] public string[] activeItemData;
    15.           …
    16.  
    17.       }
    18.  
    19. }
    20.  


    I got the following Error-Message:



    Sure I can try a Synclist, but that would be an extra hassle, and my last option.

    Is it not possible to sync Arrays as Syncvar anymore, or is it some kind of bug ??
     
  2. R3aper

    R3aper

    Joined:
    Sep 23, 2015
    Posts:
    1
    Having the same issue here too, any answers ?
     
  3. hamidstihl

    hamidstihl

    Joined:
    Nov 11, 2021
    Posts:
    1
    Having the same issue here too ...