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
- Baked GI loaded by LoadScene call with Additive mode is not cleaned up when unloading the Scene
- "Reflection Probe" borders disappear when interacting with the UI in the Inspector and one of the Reflection Probe editing tools is selected during the Baking process
- RenderGraph ContextData buffer leaks in IL2CPP when using Native Leak Detection
- Caret in "Add Default Preset" text field is vertically misaligned in Preset Manager
- Unused separation line is present at the bottom of the create GameObject sub menu when right clicking Scene in the Hierarchy
Resolution Note (2019.1.X):
The problem reported is actually caused by a misuse of the OnPostprocessTexture call.