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

AssetImporterEditor.ApplyRevertGUI

切换到手册
protected void ApplyRevertGUI ();

描述

向编辑器添加“Apply”和“Revert”按钮。

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

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

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

ApplyRevertGUI(); } }
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961