favoyang / unity-addressable-importer

A rule based addressable asset importer
MIT License
885 stars 124 forks source link

If group names contain slashes, incorrect groups are created #27

Closed eAi closed 4 years ago

eAi commented 4 years ago

I have a rule set up that (incorrectly) has a slash in the group name. This is replaced by addressables with a - symbol. This breaks the logic in CreateOrUpdateAddressableAssetEntry that tries to find an existing group - as this logic doesn't take into account this replacement behaviour - so never finds a group. The result of this is that duplicate groups are created (by addressables) when CreateAssetGroup is called - if there is more than one asset in the group.

Steps to reproduce:

What I'd expect to happen: Either slashes are forbidden in the group names and gives the user an error, or the logic in CreateOrUpdateAddressableAssetEntry has some understanding of how addressables does replacement of symbols in groups and handles this the same way. The logic for this is in the AddressableAssetGroup.Name property.

github-actions[bot] commented 4 years ago

:tada: This issue has been resolved in version 0.7.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

favoyang commented 4 years ago

Taking the second suggestion - clean the group name internally before sending it to create group function.

But I may add the otherwise either if I find a good way to validate a nested editor field in the current implementation.

favoyang commented 4 years ago

@eAi, thank you for the help. I've added you as a contributor to the README.

eAi commented 4 years ago

My pleasure - thanks for creating this!