SuperTiled2Unity
SuperTiled2Unity copied to clipboard
Predefined custom class does not export properly
we defined a custom class like this
and use it as property, we found that there is no hierarchy relationship between class and members, they exported to same layer like this
member and class are in the same level, and sometimes members are missing(there is no flag member in above pic)
is this a bug or just by design?
Hi there, @wakinpang. These custom classes were not a feature when I first put ST2U together and I didn't know about them until you posted this issue.
I'll study this some more and work on implementing it into my tool. Thanks for letting me know.
Hello @Seanba , Thanks for replying, we are trying to resolve this by adding all class's data and structure into CustomeProperty 's m_Value with json format. so when we export a class property, there is only one custom property represents the class, the member and data are in the Value box
@wakinpang can you send me your exported Object Types XML file? It will help me in testing. Thanks.
<?xml version="1.0" encoding="UTF-8"?>
<objecttypes>
<objecttype name="Script" color="#aa0000">
<property name="CorrespondType" type="int" propertytype="TriggerType" default="0"/>
<property name="ScriptFile" type="file" default=""/>
</objecttype>
<objecttype name="Test" color="#00557f">
<property name="flag" type="int" propertytype="TriggerType" default="0"/>
<property name="type" type="int" propertytype="ObjectType" default="0"/>
</objecttype>
</objecttypes>
@Seanba Of course, it's simple, the TriggerType and ObjectType are both enum.
Hi @Seanba , we commit a PR to fix this bug, but it seems like a breaking change, pls have a review. #226