Editor.OnPreviewGUI 当预览GUI

function OnPreviewGUI (r : Rect, background : GUIStyle) : void


Implement this method in a subclass if you want to have a preview field in the inspector.


The overidden method should use the rectangle passed in and render a preview of the asset into it. The default implementation is a no-op.


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