![]() ![]() I would probably get rid of the "Sprite Atlas" field in your TextMesh Pro Sprite Asset too, because it's not necessary anymore and does not work with the workflow we use. Plus the list entry also needs all your extra data OX, OY, Adv, etc. Once a list entry has been added, it's guaranteed that this ID stays the same no matter what. Maybe implement functionality to make that number only increase per added list entry, but never let it decrease. Implementing support to automatically add all sprites of an atlas (one texture that contains multiple sprites) to the list should be trivial, so it's little effort for the user to add 1000 sprites to that list and is pretty close to with what you came up already. Here is how I picture support for both workflows could be implemented:Ī TextMesh Pro Sprite List entry would have a Sprite reference, where users can drag&drop a Sprite from the project. It seems Unity magically patches/replaces such references during play or build. Right now for the first release, you will have to create a Sprite Asset just like you create Font Assets which contain all the relevant information for the Sprites to be adjusted and displayed.Ĭlick to expand.References to individual sprites in the project stay intact after Unity created the atlas. There is also the issue of how do you allow tweaking of the offsets of the individual sprites and scale since the information doesn't exists in the Sprite class.Īfter the first release, I'll look further into whether or not the Sprite Packer could be used and if the API for it has all the functionality that would be needed. The texture that contains those sprites isn't an asset that you can reference so when typing where do you look for that sprite texture / atlas. The sprites also cannot be tightly packed since the Text / Sprites for layout purposes are rectangles. It doesn't seem like you can get a list (array) of the sprites packed in that atlas. I need to explore what information is available from the Sprite Packer. We really like TextMesh Pro and the new mixed font/graphics feature is also very useful and appreciated, that's why I would really like to see it working with our workflow too.Ĭlick to expand.Does the artist provide individual images (png) for each sprite or do they provide different images (png) which contains multiple sprites? We really like not using an atlas during development, and would like to keep this workflow. Unfortunately, it's not the workflow we're used to. However, if this feature limited to providing a pre-baked atlas, I see that it's probably not going to be much of a problem with changing indices. My idea was that this issue could be solved by using either a custom name or maybe even the sprite name rather than the sprite atlas index, because the name stays the same unless you change it. My concern is that it's not guaranteed that a sprite always gets the same array index as we add and remove images from the atlas (as we add/remove the Sprite Packing Tag). We don't use pre-baked atlases in the editor, we use them in builds only (Edit > Preferences > Editor > SpritePackerMode=EnabledForBuilds). As I understand, it seems it requires pre-baked atlases? We use a workflow where artists provide images as separate textures and we use the "Sprite Packing Tag" in Unity's Texture Inspector to tell Unity into which atlas an image goes. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |