Editor.HasPreviewGUI 有否预览GUI

function HasPreviewGUI () : bool

Description描述

Override this method in subclasses if you implement OnPreviewGUI.

如果执行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.

也可使用它来禁止或启用预览,取决于目标资源。默认执行返回假,因此如果重写OnPreviewGUI,必须重新这个方法。

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.

注意:检视面板预览仅限于永久对象(资源)的主编辑器。例如,GameObjectInspector、MaterialEditor、TextureInspector。这意味着它当前无法为一个组件有它自己的检视面板预览。

Page last updated: 2011-6-28