Hi,
You know how there is that small preview window at the bottom of the FBX Importer inspector window, which shows the model in 3d, so we can rotate and check the model in there..
Is it possible to create a similar kind of window using an Editor class or scripting command?
Just figured it might be neat to have that kind of functionality to develop our own asset viewers..
Thanks..
Yes, that is possible. You can create custom inspectors or editor windows as described here.
To create a 3d view like the model preview, you could create a RenderTexture and a Camera, render into that texture using that camera, and then draw the texture into the window using GUI.DrawTexture.
Yes, you can do it by using Editor class.
Check out “HasPreviewGUI, OnPreviewGUI and OnPreviewSettings”
Unity - Scripting API: Editor.OnPreviewGUI Unity - Scripting API: Editor.OnInteractivePreviewGUI
@lokstok I’ve just finished my own preview asset, maybe it will be useful for you: https://forum.unity3d.com/threads/powerful-preview.460157/