- Home /
GetAssetPreview return null
I want to dynamic generate preview images for every models for my software, so that my software can have preview images before loading models. I want to do this step in editor.
It's an MenuItem function. The object is prefab (I tried it as GameObject and Object). I try using GetAssetPreview() to generate preview texture, but it's always null. I know it's asynchronously, so i tried using loop with Thread.Sleep and Enumerator,and wait for more than 5 seconds. Didn't work. AssetPreview.IsLoadingAssetPreview() is false. AssetPreview.IsLoadingAssetPreviews() is also false.
Any suggestions?
Answer by SunnyChow · Jul 25, 2016 at 04:10 AM
I end up using PreviewRenderUtility. a lot of steps, but flexible
Your answer

Follow this Question
Related Questions
Minor code changes not showing up in preview/run 2 Answers
Mecanim Animation Preview Window - Blue and Red arrows? 3 Answers
How to generate a Texture2D of the thumbnail of a prefab? 1 Answer
What are Camera Types for? 1 Answer
The name PreviewEditorWindow does not exist in this current context 2 Answers