Author Topic: Two dimensional array of ints  (Read 1782 times)

ErikT

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Two dimensional array of ints
« on: May 27, 2016, 02:23:11 PM »
Just a quick question, is it possible to tno.send a multi-dimensionally array? If not, is there a super sweet secret way to do it, or should I just combine and parse the elements? (I've seen posting this been converting to an array of bytes and sending that way)

I tried sending one on my own and I got this error: Method not found: 'Default constructor not found...ctor() of System.Int32[,]'.
« Last Edit: May 27, 2016, 05:23:17 PM by ErikT »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Two dimensional array of ints
« Reply #1 on: May 27, 2016, 10:11:51 PM »
I don't believe I wrote support for multi-dimensional array serialization, so I would tentatively answer with a "no". I would suggest sticking to more basic types. The same 2-dimensional array can always just be represented as a 1-dimensional array with a width and height. Unity's mesh data (vertex list, indices etc) as well as texture data are all like that, for example. IIRC only one class breaks this convention -- Unity's terrain.