SuperTiled2Unity icon indicating copy to clipboard operation
SuperTiled2Unity copied to clipboard

CustomTmxImporters can interpret Tiled properties of type "object"

Open vvnurmi opened this issue 2 years ago • 1 comments

Added method TmxAssetImporter.GetObject(int id). It enables custom TMX importers to interpret Tiled properties that are of type "object". For example, in an overridden method CustomTmxImporter.TmxAssetImported(TmxAssetImportedArgs args) you can do this:

GameObject go = ...;
int objectId = go.GetSuperPropertyValueInt("myObjectProperty", -1);
GameObject otherGo = args.AssetImporter.GetObject(objectId);

vvnurmi avatar Jan 05 '23 20:01 vvnurmi

Hi there. I think this looks good. I'm currently in the process of converting ST2U to be used as a package (in the Package Manager) instead of being distributed as a *.unitypackage file.

That has forced me to re-arrange the code a bit but I'll remake your changes in the branch I'm working in. Thanks.

Seanba avatar Jan 06 '23 04:01 Seanba