Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
eAi opened this issue May 18, 2020 · 4 comments
Closed

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

eAi opened this issue May 18, 2020 · 4 comments
Labels

Comments

@eAi
Copy link

eAi commented May 18, 2020

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:

  • Create a rule that applies to more than one asset
  • Set the group name to contain a slash
  • Apply the rules using the context menu
  • Notice you have more than one group created, one containing each item with a 1/2/3 (etc) suffix added.

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 pushed a commit that referenced this issue May 18, 2020
## [0.7.2](v0.7.1...v0.7.2) (2020-05-18)

### Bug Fixes

* clean group name internally (close: [#27](#27)) ([f99b399](f99b399))
@github-actions
Copy link

🎉 This issue has been resolved in version 0.7.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@favoyang
Copy link
Owner

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
Copy link
Owner

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

@eAi
Copy link
Author

eAi commented May 18, 2020

My pleasure - thanks for creating this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants