Search Issue Tracker
Won't Fix
Votes
0
Found in
2018.2.11f1
Issue ID
1093051
Regression
No
TextureImporterType.Sprite does not create a usable sprite when called in OnPostprocessTexture
How to reproduce:
1. Open the attached Unity project
2. Drag an PNG or JPEG file (for example an image from your own pictures folder) an onto Assets/LevelMenu folder
Expected result: The image is being imported as a Sprite and is ready to use
Actual result: The image is imported as a Sprite but it can't be used when dragged onto a Sprite Component or any other Texture Component, and is lacking the arrow next to it that can be clicked, to display the image
Reproduced in: 2017.4.15f1 2018.1.9f2, 2018.2.16f1, 2018.3.0b10, 2019.1.0a9
Note: The user followed the steps In the video which Unity has released, where it works as intended. there is no issue if called "void OnPreprocessTexture()" or if in "OnPostprocessTexture()" you use the call "assetImporter.SaveAndReimport();" once after image it was imported.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Return value and out parameter get scrambled when a Custom HLSL Operator is used
- Some UI Toolkit pixels are transparent when not all corners are rounded
- The default layout file gets corrupted when the project is saved and closed after running a specific Test Runner test
- Cameras overlay sometimes show “No Cameras” for a split second instead of “Main Camera” when clicked to move the overlay
- Sprite Mode defaults to "Multiple" instead of "Single" when switching the Texture Type to "Sprite (2D and UI)"
Resolution Note (2019.1.X):
The problem reported is actually caused by a misuse of the OnPostprocessTexture call.