Version: 2017.1
Experimental: this API is experimental and might be changed or removed in the future.

AssetImporterEditor.ApplyRevertGUI

切换到手册
protected void ApplyRevertGUI ();

描述

Add's the 'Apply' and 'Revert' buttons to the editor

从 OnInstpectorGUI 事件处理程序方法调用,因为这是 Apply/Revert 按钮在编辑器中的放置位置。 此方法不能重载,但可以通过重新实现 OnApplyRevertGUI 事件处理程序方法注入自定义行为。

using UnityEngine;
using UnityEditor;
using UnityEditor.Experimental.AssetImporters;

public class ExampleScript : MonoBehaviour { public override void OnInspectorGUI() { // Add custom controls here...

ApplyRevertGUI(); } }