SuperTiled2Unity
SuperTiled2Unity copied to clipboard
[PR] Export Complex Custom Type as Json String
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:

which will be exported in Unity SuperCustomProperties:

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"
}
}
}
}