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。这意味着它当前无法为一个组件有它自己的检视面板预览。

最后修改:2011年6月28日 Tuesday 9:39

本脚本参考基于Unity 3.4.1f5

英文部分版权属©Unity公司所有,中文部分© Unity圣典 版权所有,未经许可,严禁转载 。