Editor.HasPreviewGUI 有否预览GUI

function HasPreviewGUI () : bool


Override this method in subclasses if you implement OnPreviewGUI.


You can also use it to disable or enable preview depending on the target asset. The default implementation simply returns false, so if you override OnPreviewGUI you have to override this method as well.


Note: Inspector previews are limited to the primary editor of persistent objects (assets), e.g., GameObjectInspector, MaterialEditor, TextureInspector. This means that it is currently not possible for a component to have its own inspector preview.


Page last updated: 2011-6-28