Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. The 2022.2 beta is now available for testing. To find out what's new, have a look at our 2022.2 feature highlights.
    Dismiss Notice
  3. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here:
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice
Dismiss Notice
Submit bug reports tagged with #Beta2022Win_Unity when you encounter unknown issues while testing the 2022.2 betas for a chance to win a year of Unity Pro. For more information, have a look at our Beta Sweepstakes Announcement.

Sprite Atlas How to distinguish two Sprite Atlases with the same name according to the SpriteAtlas.tag?

Discussion in '2D Experimental Preview' started by jswn7561, Nov 27, 2018.

  1. jswn7561


    Nov 27, 2018
    Sprite Atlas defaults to the same tag as the name, and there is no official API to modify the tag, which means that if two Sprite Atlases have the same name, it is impossible to distinguish which SpirteAtlas should be loaded according to the tag passed by SpriteAtlasManager.RequestAtlasCallback. Even if the Sprite Atlas's tag is modified through a text editor, it will be automatically modified back to the same value as the name when building AssetBundle. So in order for each Sprite Atlas to have a unique tag, is there any other way except use Sprite Atlas paths or IDs such as GUID as Sprite Atlas names?
    Sorry for my poor English. Unity 2018.2.16f1
  2. Venkify


    Unity Technologies

    Apr 7, 2015
    @jswn7561 Using name was a simple way to tag Atlases. And in most cases you would want to have a unique way to identify the Sprite-Atlas by names if multiple atlases are involved. This is is the recommended way at this point of time.