Skip to content

Conversation

@vvnurmi
Copy link
Contributor

@vvnurmi vvnurmi commented Jan 5, 2023

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);

This 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);
@Seanba
Copy link
Owner

Seanba commented Jan 6, 2023

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.

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.

2 participants