Update an existing Sprite Asset

Hello,
Is it possible to update an existing Sprite Asset after the source texture atlas has been modified, without having to create a brand new Sprite Asset each time?
Thank you in advance for your answer! :slight_smile:

1 Like

Try right clicking on the updated sprite and selecting create new sprite. If the old sprite is in the same folder, it will be updated.

1 Like

I have made some improvements to this workflow which will be available in the next release of TMP.

I’ll try creating a video that explains the changes / improvements.

EDIT: Wait! The quote below works! It was just a visual bug (that’s repro’d every time, annoyingly enough :P)

  • I set my TexturePacker settings trim mode to “Crop, keep position”. I don’t know if this is the best one, but it works.
  • I export TexturePacker to the same dir as the earlier-generated TMPro Sprite Asset from TP.
  • I right click >> TMP >> Create Sprite Asset
  • ALL of your sprites will poof. You need to leave the scene and return (Unity 2018.3). This is only a visual bug.
  • Return to your scene >> All my values remain and nothing’s broken, except the new stuff is there!

–

All this did was duplicate the old with the new :frowning:

–

What’s the latest on this? I have a horrible workflow for this, currently, that I’m sure can be improved:

https://www.reddit.com/r/gamedev/comments/bpos6n/texturepacker_how_the_heck_to_efficiently_update/

See the following post as it includes additional insight on some of the recent changes I made.

Hello @Stephan_B

Are you saying that that post has information for updating the texture contents of an existing TMP_SpriteAsset?

Because it seems to only refer to updating an existing TMP_FontAsset.

Am I missing something?

Thank you for your time
Les

The texture content itself cannot be updated inside of Unity but the texture itself via the Unity Sprite Editor contains the definition of the sprites contained in the texture. That part can be edited via the Unity Sprite Editor which is what TMP Sprite Asset use to define the Sprite Characters and Sprite Glyphs.

It refers to updating of Sprite Assets. The image / red arrow shows the Update Sprite Asset button which I explain in that post.

Hello @Stephan_B

I think I must be confused about something.

This is what I am working with in Unity 2018 LTS and the current-verified version (1.3) of TMP.

4853318--467057--upload_2019-8-13_12-54-23.png

I don’t see the “Update Sprite Asset” button or any option under the gear either.

Also, that other thread shows info about glyphs, font sizes, etc. None of that type of info is part of my TMP_SpriteAsset.

Thank you
Lester

Latest release is 1.4.1 which includes the new Dynamic System. See the following top sticky post for more details.

As a result of the introduction of the new dynamic system, Sprite Asset structure has changed to include Sprite Character and Sprite Glyph tables. This mirrors the structure of Font Assets which is explained in the video linked in that sticky post.

In the next release, the Update Sprite Asset option will be available to make it easier to update Sprite Assets when the content of the texture and includes sprites has changed.

Sprite Assets will also gain Face Info where instead of inheriting the metrics of the currently used font asset will now be able to optionally have their own metrics. See the following post which is sort of the catalyst for this new functionality.

1 Like

I see. Thank you.

Did this happen? Where is this option? I am struggling to add a single new sprite to an existing asset.

Ditto that! I can’t see the Update button on latest.

What version of the TMP package are you using?

Can you post a screenshot of what you are seeing?

I can confirm that the Update button works fine on version 2.1.1.

2 Likes