AssetImporterEditor.ApplyRevertButtonContainer
Adds the 'Apply' and 'Revert' buttons to the Editor UI. Use this VisualElement in a ScriptedImporterEditor when AssetImporterEditor.needsApplyRevert is enabled. This is the UIToolkit equivalent to AssetImporterEditor.ApplyRevertGUI().
Read time 8 minutesLast updated 16 days ago
Definition
- Type: Class
- Namespace: UnityEditor.AssetImporters
- Assembly: UnityEditor.CoreModule
- Inherits from: VisualElement
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle
public class AssetImporterEditor.ApplyRevertButtonContainer : VisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle
Examples
using UnityEngine;using UnityEditor;using UnityEditor.AssetImporters;using UnityEngine.UIElements;public class ExampleScript : ScriptedImporterEditor{ public override VisualElement CreateInspectorGUI() { var root = new VisualElement(); var applyRevertContainer = new ApplyRevertButtonContainer(this); root.Add(applyRevertContainer); return root; }}
Constructors
Constructor | Description |
|---|---|
| ApplyRevertButtonContainer(UnityEditor.AssetImporters.AssetImporterEditor) | Constructs a AssetImporterEditor.ApplyRevertButtonContainer. |