Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Mirror: How should I use SyncList to sync a list on both client and server

Discussion in 'Multiplayer' started by TorontoDurant, Oct 3, 2022.

  1. TorontoDurant


    Jul 26, 2022
    Hello, I met a problem when using SyncList. I have a SyncList<group> groupList and every group has a guid. I called groupList.Add(A) in a command function and found the guid of group received by the callback is different from A.

    Code (CSharp):
    1.  var newGroup = new ActivityGroup();
    2. newGroup.GUID = System.Guid.NewGuid().ToString();
    3. groupList.Add(newGroup);
    I tried to output the guid in callback function and found it's null