SpriteModifierTool Class

Summary

[Editor-Only] [Pro-Only] A base Animancer.Editor.Tools.AnimancerToolsWindow.Tool for modifying UnityEngine.Sprites.
graph BT Type-->Base0["AnimancerToolsWindow.Tool"] click Base0 "/animancer/api/Animancer.Editor.Tools/Tool" Base0-->Base1["Object"] Type-.->Interface0["IComparable<AnimancerToolsWindow.Tool>"] Type["SpriteModifierTool"] class Type type-node Derived0["ModifySpritesTool"]-->Type click Derived0 "/animancer/api/Animancer.Editor.Tools/ModifySpritesTool" Derived1["GenerateSpriteAnimationsTool"]-->Type click Derived1 "/animancer/api/Animancer.Editor.Tools/GenerateSpriteAnimationsTool" Derived2["RenameSpritesTool"]-->Type click Derived2 "/animancer/api/Animancer.Editor.Tools/RenameSpritesTool"

Syntax

[Serializable]
public abstract class SpriteModifierTool : AnimancerToolsWindow.Tool, 
    IComparable<AnimancerToolsWindow.Tool>

Remarks

Documentation: Animancer Tools

Attributes

Type Description
SerializableAttribute

Properties

Name Value Summary
AreYouSure string
The message to confirm that the user is certain they want to apply the changes.
DisplayOrder int
Lower numbers display first.
HelpIcon Texture
The help icon image used in the tool header.
static
HelpURL string
The URL for the help button in the header to open.
Instructions string
The usage instructions to display at the top of this tool.
IsExpanded bool
Is the body of this tool currently visible?
IsVisible bool
Is this tool currently visible?
Name string
The display name of this tool.
Sprites List<Sprite>
The currently selected UnityEngine.Sprites.
static

Methods

Name Value Summary
AfterApply() void
Called after all changes are applied.
AskAndApply() void
Asks the user if they want to modify the target UnityEngine.Sprites and calls Animancer.Editor.Tools.SpriteModifierTool.Modify(Animancer.Editor.Tools.SpriteDataEditor,System.Int32,UnityEngine.Sprite) on each of them before saving any changes.
BeforeApply() void
Called immediately after the user confirms they want to apply changes.
CompareTo(AnimancerToolsWindow.Tool) int
Compares the Animancer.Editor.Tools.AnimancerToolsWindow.Tool.DisplayOrder to put lower numbers first.
DoBodyGUI() void
Draws the Body GUI for this tool which is only displayed while it is expanded.
DoGUI() void
Draws the GUI for this tool.
DoHeaderGUI() void
Draws the Header GUI for this tool which is displayed regardless of whether it is expanded or not.
GatherSelectedSprites(List<Sprite>) void
Adds all UnityEngine.Sprites in the UnityEditor.Selection.objects or their sub-assets to the list of `sprites`.
static
HandleDragAndDropIntoList<T>(Rect, IList<T>, bool) void
Adds any objects dropped in the `area` to the `list`.
LoadAllSpritesAtPath(string) Sprite[]
Returns all the UnityEngine.Sprite assets at the `path`.
static
LoadAllSpritesInTexture(Texture2D) Sprite[]
Returns all the UnityEngine.Sprite sub-assets of the `texture`.
static
Modify(SpriteDataEditor, int, Sprite) void
Applies the desired modifications to the `data` before it is saved.
Modify(TextureImporter, List<Sprite>) void
Applies the desired modifications to the `data` before it is saved.
NaturalCompare(Object, Object) int
Calls UnityEditor.EditorUtility.NaturalCompare(System.String,System.String) on the UnityEngine.Object.names.
static
OnDisable() void
Called by Animancer.Editor.Tools.AnimancerToolsWindow.OnDisable.
OnEnable(int) void
Called by Animancer.Editor.Tools.AnimancerToolsWindow.OnEnable.
OnSelectionChanged() void
Called whenever the UnityEditor.Selection changes.
SaveModifiedAsset<T>(string, string, T, Action<T>) bool
Asks the user where they want to save a modified asset, calls `modify` on it, and saves it.
static