Jump to content

Spriter.Net and Unity Animations C#


Gil8ert

Recommended Posts

Hi all!

I know a little about what I'm doing here - but not enough! With thanks in advance, here's my problem:

I have already created a character in Unity and used the unity Animation feature to give that character a few animations. These animations exist within .anim files that are referenced by the Animator. For instance Player_Walk.anim and Player_Run.anim are 2 such files. 

The animator controls which file to load depending on variables I have set - (Speed > 25 will play the Player_Walk.anim)

There is a script file attached to the player which updates these variables, subsequently changing the animations. 

HOWEVER. I have created a Spriter Pro file now with Several animations that exist within the Spriter file. How do I ask Unity to play these animations? I have installed the Spriter.Net extension and that seems fine, and I know it recognises my characters' animations because if I put the walking animation as the first animation in the file, then when the level loads I get an infinite loop of my character walking. So how do I reference these animations from my code? 

Can I attach them to the animator some how?!

 

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...