GenerateSpriteAnimationsTool Class

Summary

[Editor-Only] [Pro-Only] A Animancer.Editor.Tools.SpriteModifierTool for generating UnityEngine.AnimationClips from UnityEngine.Sprites.
graph BT Type-->Base0["SpriteModifierTool"] click Base0 "/animancer/api/Animancer.Editor.Tools/SpriteModifierTool" Base0-->Base1["AnimancerToolsWindow.Tool"] click Base1 "/animancer/api/Animancer.Editor.Tools/Tool" Base1-->Base2["Object"] Type-.->Interface0["IComparable<AnimancerToolsWindow.Tool>"] Type["GenerateSpriteAnimationsTool"] class Type type-node

Syntax

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

Remarks

Documentation: Generate Sprite Animations

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.
Inherited from SpriteModifierTool
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.
Inherited from SpriteModifierTool
static

Methods

Name Value Summary
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.
Inherited from SpriteModifierTool
CompareTo(AnimancerToolsWindow.Tool) int
Compares the Animancer.Editor.Tools.AnimancerToolsWindow.Tool.DisplayOrder to put lower numbers first.
DoBodyGUI() void
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`.
Inherited from SpriteModifierTool
static
HandleDragAndDropIntoList<T>(Rect, IList<T>, bool, Func<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`.
Inherited from SpriteModifierTool
static
LoadAllSpritesInTexture(Texture2D) Sprite[]
Returns all the UnityEngine.Sprite sub-assets of the `texture`.
Inherited from SpriteModifierTool
static
Modify(SpriteDataEditor, int, Sprite) void
Applies the desired modifications to the `data` before it is saved.
Inherited from SpriteModifierTool
Modify(TextureImporter, List<Sprite>) void
Applies the desired modifications to the `data` before it is saved.
Inherited from SpriteModifierTool
NaturalCompare(Object, Object) int
Calls UnityEditor.EditorUtility.NaturalCompare(System.String,System.String) on the UnityEngine.Object.names.
Inherited from SpriteModifierTool
static
OnDisable() void
Called by Animancer.Editor.Tools.AnimancerToolsWindow.OnDisable.
OnEnable(int) void
Called by Animancer.Editor.Tools.AnimancerToolsWindow.OnEnable.
OnSelectionChanged() void
PrepareToApply() void
Called immediately after the user confirms they want to apply changes.
Inherited from SpriteModifierTool
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