Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

reavenheart

1
Posts
1
Topics
44
Following
A member registered Jan 17, 2019

Recent community posts

(1 edit)

Hello. Thank you very much for the great tool. I'm learning it to use in my projects. The issue that I have with the current version of JSON export is that I cannot parse data correctly if I use regular serialization of Unity C#. The example is as follows:
I have an Parent object and 2 nested child objects that extend it's values. Also there's another object that has some of it's values and a collection of references to those objects.

The result of the export is:

{
    "CollectionOfItems": { "items": ["itemChild02", "itemChild01", "itemParent01"], "someVal": "" },
    "itemChild01": { "child01Val": false, "parentVal": false },
    "itemChild02": { "child01Val": false, "child02Val": false, "parentVal": false },
    "itemParent01": { "parentVal": false }
}

It creates an object of different elements, where a collections and items are equal elements. I cannot differentiate the object type of Items and the collection. Also the ID of the object is set as a key of the dictionary, chat is not that useful for Unity C# parsing purposes. Categorized options doesn't work here as it has lots of garbage of useless folders in it.

What would be great if the data could be organized the following way:

{
    "Collections":
    [
        {
            "ID": "CollectionOfItems", "items":
            [
                { "ID": "itemChild01", "child01Val": false, "parentVal": false },
                { "ID": "itemChild02", "child01Val": false, "child02Val": false, "parentVal": false },
                { "ID": "itemParent01", "parentVal": false }
            ],
            "someVal": ""
        },
    ]
}

In this case I could receive an object that has has an array of objects (as there can be multiple of them) of type CollectionOfItems (or it's parents). It's possible to see that the items inside of the collection is also an array of objects. An element ID could be an internal field of the object. In this case it would be possible to identify all of the objects and the hierarchy.

If this feature can was implemented, it could be very easy to use an automatic serialization of the C# language. I'll just create a class with the same values and [System.Serialized] attribute. I'm adding a project of the example above and json files. You can find them by following this link: https://drive.google.com/drive/folders/1td2aa-bANI0ft0IrOkSMJJyfxJLTTITL?usp=sha...

If your projects is open source, maybe I could help you to develop that feature?

Thank you very much in advance.