Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Json Serialization

Discussion in 'Project Tiny' started by dallin_unity, Jul 30, 2021.

  1. dallin_unity

    dallin_unity

    Joined:
    Dec 18, 2019
    Posts:
    40
    Hi guys, can I serialize a class/struct to Json format in Tiny?
    Thanks guys
     
  2. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    676
    To write JSON you must use Tiny JSON package. You cannot automatically serialize a struct/class because Reflections are not available on the .NET subset used by Tiny. You must explicitly write each member of you struct/class using the package mentioned above.
     
    dallin_unity likes this.