Skip to content

Conversation

yuwenhuisama
Copy link

@yuwenhuisama yuwenhuisama commented Oct 16, 2022

This PR is related to #225

We found there are some bugs when we export custom properties with SuperTiled2Unity.CustomProperty where the original code cannot handle complex custom property (with nested structures).

This PR has fixed this bug by exporting all the property as json string, for example:

Custom property like this:

image

which will be exported in Unity SuperCustomProperties:
image

PlaintInt
- Name: PlaintInt
- Type: int
- Value: {"type":"int","value":"0"}

TestProperty
- Name: TestProperty
- Type: TestClass
- Value: {{
    "type": "class",
    "realType": "TestClass",
    "Field1": {
        "type": "int",
        "realType": "int",
        "value": "0"
    },
    "Field2": {
        "type": "int",
        "realType": "int",
        "value": "0"
    },
    "Field3": {
        "type": "string",
        "value": "new String"
    },
    "SubClass": {
        "realType": "TestSubClass",
        "type": "class",
        "value": {
            "Value": {
                "type": "string",
                "realType": "string",
                "value": "the value"
            }
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant