Serialize a List

Options
Hello,

As you can't normally send a list trough the OnPhotonSerializeView, i was wondering what best practices are.
I tried sending deserialized to string using binary formatter, and serializing it upon receiving, but i couldnt get it to work.
An array isn't an option.
Any help/suggestions are much appreciated!

Comments

  • [Deleted User]
    edited June 2018
    Options
    Hi @Just,

    you can try to convert the list into an array by calling ToArray(); on that list before serializing it. I guess this is much easier than trying to register a Custom Type which you would have to do otherwise. What kind of data is stored in the list?
  • Just
    Options
    Hi @Christian_Simon,

    Thanks for the reply!
    I'm going to try that when i get home later this day!
    The list contains class objects with two bools and a gameobject.