Search Unity

[TextMesh Pro] Very difficult to add new sprites to sprite asset

Discussion in 'UGUI & TextMesh Pro' started by martinasenovdev, Nov 18, 2018.

  1. martinasenovdev

    martinasenovdev

    Joined:
    May 7, 2017
    Posts:
    67
    hello there,
    on numerous occasions I had to add new sprites to my Sprite Asset I have as default and I must say it is extremely difficult.
    With all the sprite settings that I've adjusted manually on the Sprite Asset, adding new one may only go through updating the sprite and generating new Sprite Asset out of it. Then it is not possible to have my custom adjustments I did in the original Sprite Asset and somehow persist them with the new sprite added. Also the setting "Copy component" that Unity has is not applicable here, I can not use it.
    At this point my only solution will be to go over all the sprites in the new Sprite Asset and adjust them manually which is a lot of pain.

    It would be great if there is some kind of "Refresh from source" or whatever logic so that new sprites are loaded within the Sprite Asset and keep the settings of the existing sprites, without having to discard all of it.

    Thank you!
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    See the following thread which explains how you can update a Sprite Asset. This isn't perfect but it will allow to retain the changes you made previously.

    Also, it important to point out that the sprite asset and the sprites referenced simply end up referencing some UV coordinates in a texture. Provided the texture and more importantly the position of the previous sprite images do not change where the new sprite was added in some empty portion of the original texture, you can manually create a new sprite reference in the sprite asset and then manually entering its uv coordinates and data.

    P.S. I do want to improve the workflow around managing / editing sprite asset at some point.
     
    martinasenovdev likes this.
  3. martinasenovdev

    martinasenovdev

    Joined:
    May 7, 2017
    Posts:
    67
    Ah, yes, those +/- buttons I never paid attention to. Now that you mentioned them they make perfect sense.
    And yes, I know it does reference UV coordinates in a sprite but I didn't figure out that easy way of adding it to the Sprite Asset.

    That makes perfect sense, thank you. Maybe if it is explained somewhere it would save a lot of headache for others.

    Thank you!