Class SpriteAnimationSet
Inheritance
System.Object
UnityEngine.Object
UnityEngine.ScriptableObject
SpriteAnimationSet
Namespace: InsaneScatterbrain.RetroKit.Editor
Syntax
public class SpriteAnimationSet : ScriptableObject
Properties
AnimatorController
Gets Unity animator controller, generated based on the data in this animation set.
Declaration
public AnimatorController AnimatorController { get; }
Property Value
| Type | Description |
|---|---|
| UnityEditor.Animations.AnimatorController |
Count
Gets the number of sprite animations in this animation set.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Item[Int32]
Gets sprite animation with given key.
Declaration
public SpriteAnimation this[int key] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | key | The key. |
Property Value
| Type | Description |
|---|---|
| SpriteAnimation |
Methods
Add(SpriteAnimation)
Adds a sprite animation to the set.
Declaration
public void Add(SpriteAnimation spriteAnimation)
Parameters
| Type | Name | Description |
|---|---|---|
| SpriteAnimation | spriteAnimation | The sprite animation. |
Create(String, ObjectRepository<AnimatorController>)
Creates and initializes a new sprite animation set.
Declaration
public static SpriteAnimationSet Create(string name, ObjectRepository<AnimatorController> animatorControllerRepository)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The set's name. |
| ObjectRepository<UnityEditor.Animations.AnimatorController> | animatorControllerRepository | The repository in which to store the generated animator controller. |
Returns
| Type | Description |
|---|---|
| SpriteAnimationSet | The sprite animation set. |
Remove(SpriteAnimation)
Removes the sprite animation from the animation set.
Declaration
public void Remove(SpriteAnimation spriteAnimation)
Parameters
| Type | Name | Description |
|---|---|---|
| SpriteAnimation | spriteAnimation | The sprite animation. |
ResetAnimatorController()
Attempts to reset the AnimatorController to it's original state and re-adds the animations and transitions.
Declaration
public void ResetAnimatorController()
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String |
Overrides
UnityEngine.Object.ToString()