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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Resolution Note (2019.1.X):
The problem reported is actually caused by a misuse of the OnPostprocessTexture call.