Description

UPaperSprite::PostLoad() now sets BakedSourceTexture, BakedSourceUV, and BakedSourceDimension (if AtlasGroup is nullptr). There's nothing in reimport that sets them, so they are stale/latch to the values from load rather than the correct updated values computed during reimport.

They were originally only ever meant for in-editor-atlased textures, now that that's changed, we need to compute them whenever anything changes SourceUV/SourceDimension/SourceTexture if AtlasGroup is nullptr I guess.

Steps to Reproduce

1. Download and unzip TestSpriteImport_Horizontal.zip and TestSpriteImport_Vertical.zip
2. Rename the TestSpriteImport_Horizontal folder to TestSpriteImport
3. import the file inside named TexturePackerExport.paper2dsprites
4. Place the four sprites inside the Frames directory into a map and save everything.
5. *CLOSE THE EDITOR*
6. Reopen the editor
7. Stomp on the files in the TestSpriteImport directory with the files from TestSpriteImport_Vertical
8. Open the map you saved
9. Right-click on TexturePackerExport in the content browser and Reimport.

Expected: The sprites in the map stay the same (CorrectSpriteTextureCoords.png)
Actual: The sprites in the map change appearance (IncorrectSpriteTextureCoords.png).

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-96261 in the post.

3
Login to Vote

Fixed
ComponentGameplay - Paper2D
Affects Versions4.244.254.26
Target Fix4.26
Fix Commit14476954
Release Commit14476954
CreatedAug 1, 2020
ResolvedOct 13, 2020
UpdatedOct 19, 2020