- Home /
Why does GetAssetPreview return null for model?
Below is my very simple code. I am trying to get a preview image like Unity uses in its selection menus in the editor. Instead, it returns null.
Are the certain settings that must be set on the model to be able to generate a preview?
public Texture2D PreviewImage {
get {
if (tilePreviewImage==null){
Debug.Log("Model: "+_model);
tilePreviewImage = AssetPreview.GetAssetPreview(_model);
}
return tilePreviewImage;
}
}
I am trying to call it during an OnGUI if that makes a difference.
Also the model in question was loaded from a bundle.
Answer by Jeff-Kesselman · Dec 28, 2013 at 12:56 AM
Found my own answer. This does not work at runtime.
Have a new problem but Ill post on that.
Your answer
Follow this Question
Related Questions
Proper approach to updating assets 1 Answer
Can I import assets after I built my scene? (Something like Mods?) 1 Answer
How to optimize the assets for the android platform? 0 Answers
Unable to Unrender an imported model. 0 Answers
Make cut to imported asset/model,Make cuts to imported assets/models 2 Answers