SpriteDataEditor Class

Summary

A wrapper around the '2D Sprite' package features for editing Sprite data.
Assembly
Animancer.dll
Namespace
Animancer.Editor.Tools
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["SpriteDataEditor"] class Type type-node

Syntax

public class SpriteDataEditor

Constructors

Name Summary
SpriteDataEditor(TextureImporter) Creates a new Animancer.Editor.Tools.SpriteDataEditor.

Properties

Name Value Summary
SpriteCount int
The number of sprites in the target data.

Methods

Name Value Summary
Apply() void
Applies any modifications to the target asset.
GetAlignment(int) SpriteAlignment
Returns the alignment of the sprite at the specified `index`.
GetBorder(int) Vector4
Returns the border of the sprite at the specified `index`.
GetName(int) string
Returns the name of the sprite at the specified `index`.
GetPivot(int) Vector2
Returns the pivot of the sprite at the specified `index`.
GetRect(int) Rect
Returns the rect of the sprite at the specified `index`.
IndexOf(Sprite) int
Tries to find the index of the data matching the `sprite`.
SetAlignment(int, SpriteAlignment) void
Sets the alignment of the sprite at the specified `index`.
SetBorder(int, Vector4) void
Sets the border of the sprite at the specified `index`.
SetName(int, string) void
Sets the name of the sprite at the specified `index`.
SetPivot(int, Vector2) void
Sets the pivot of the sprite at the specified `index`.
SetRect(int, Rect) void
Sets the rect of the sprite at the specified `index`.
ValidateBounds(int, Sprite) bool
Logs an error and returns false if the data at the specified `index` is out of the texture bounds.