Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Third Party [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,347
    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.