Hello,
I'm using Animation engine for my character : Sprites Unity
What I'm trying to do is to trigger an animation from script using the Animate Action.
I do the following
actionCharAnim = ScriptableObject.CreateInstance<ActionCharAnim>();
actionCharAnim.isPlayer = true;
actionCharAnim.method = ActionCharAnim.AnimMethodChar.PlayCustom;
actionCharAnim.clip2D = "MyAnimationName";
actionCharAnim.willWait = true;
actionCharAnim.Run();
But this on execution gives me an error : Could not create animation engine!
What Am I missing?
Thank you!
p.s. sorry I accidentally posted it on wrong forum...
Comments
To avoid the error, replace:
actionCharAnim.isPlayer = true;
with:
actionCharAnim.animChar = KickStarter.player;
To be able to make use of "willWait", you should instead just make an ActionList asset with the Action as normal, and then call it via script:
myActionListAsset.Interact ();
So I create an actionList seting up the action as I wish and run it through script with interact..
Thank you very much
You can prevent an ActionList asset from blocking gameplay by changing its When running field to Run In Background.