Skip to content

Create animation events from cel user data #10

@aschearer

Description

@aschearer

Currently it's not possible to add animation events to the imported clips. Animation events are pretty critical. For example, if you want to emit foot steps at specific frames, or if you want to trigger an attack at a specific moment. Aseprite has support for custom "user data" per cel. It would be super handy to connect that to the importer and programmatically add events to the imported clips. Unity has support for this, but I couldn't sort out how to read the cel's user data -- any pointers? Happy to create a pull request once unblocked.

var animationEvent = new AnimationEvent();
animationEvent.time = time;
animationEvent.functionName = "foobar";
var events = new List<AnimationEvent>();
events.Add(animationEvent);
AnimationUtility.SetAnimationEvents(clip, events.ToArray());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions