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.

Unity Multiplayer [Mirror] Is it possible to sync 2d lists?

Discussion in 'Multiplayer' started by LordQuaggan, Mar 22, 2020.

  1. LordQuaggan

    LordQuaggan

    Joined:
    Mar 22, 2020
    Posts:
    6
    I have looked at the documentation and have managed to synchronise both variables and lists between two computers using Mirror but I was wondering if it was possible to easily synchronise a 2d list (list of lists) as that would be very helpful for the game I am working on (a basic card game where you are dealt hands - I was planning on having the hands all stored in the same list). Obviously there are loads of workarounds, but I was wondering if there is anything obvious I have missed to allow synchronisation of a 2d list.
     
  2. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,299
    SyncLists can only contain simple types and structs of simple types (mostly). So no lists of lists.
    So you want to have a synchronized matrix then?
    Maybe open an issue on our issue tracker and explain the use case. We will consider it.
    We already have SyncList/Dictionary/Set anyway.