Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Animancer - Less Animator Controller, More Animator Control

Discussion in 'Assets and Asset Store' started by Kybernetik, Oct 8, 2018.

  1. Camarent

    Camarent

    Joined:
    Feb 19, 2014
    Posts:
    168
    Hello!
    I am trying to find alternatives for animator because of the one particular restriction. I would like to use flat hierarchy for rig because we need a lot of bones and few characters but we also need to use custom IK. Animator have an option to optimize model and use internal rig instead of hierarchy of transform but then if you need IK you can use only built-in version.
    Can Animancer work with optimized models and give an access to internal data for creating custom IK?
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    Animancer is no different from the Animator Controller system in that regard. If the objects are optimized then you won't be able to reference them to give to an IK system so only the inbuilt Humanoid IK can be used.

    But you should be able to at least get some benefit if you enable optimization and exclude only the bones you need for IK.
     
  3. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    348
    Hallo,

    I have a class like this in my MonoBehaviour:

    Code (CSharp):
    1.         [System.Serializable]
    2.         class SimpleAnim {
    3.             public string ID = "";
    4.             public ClipState.Transition[] animTransitions = null;
    5.         }
    and use it for an array inside the same MonoBehaviour:

    Code (CSharp):
    1.        [SerializeField] SimpleAnim[] simpleAnimations = null;
    The problem is that as soon as I open this array inside the Inspector, the error "InvalidOperationException: Queue empty." gets constantly printed. Unity is version 2020.3.0f1. Is there a way to circumvent this?

    EDIT: As a hack, adding [NonReorderable] to the simpleAnimations field fixes it.
     
    Last edited: Apr 13, 2021
  4. xiao-xxl

    xiao-xxl

    Joined:
    Nov 16, 2018
    Posts:
    48
    Is it compatible with Spine?
     
  5. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    @ratking I can see the error, but the stack trace is all Unity classes so I suspect reorderable lists aren't supposed to be nested. I've reported a Unity bug but for now [NonReorderable] is likely all you can do.

    @Xiao_Xu I'm not familiar with Spine, but from my understanding it is a completely standalone animation system which serves the same purpose as Animancer so it wouldn't make sense to use them both at the same time.
     
    ratking likes this.
  6. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    ratking and hopeful like this.
  7. xiao-xxl

    xiao-xxl

    Joined:
    Nov 16, 2018
    Posts:
    48
    I have many animation source files and they are made in different ways. Some 2d animations are made by spine and some 3d animations or UI animations are not. Spine has its own animation system, but it can also use unity's Mecanim. I used to use Mecanim to play all kinds of animations, because in this way i can play all kinds of animations in one way.

    The most important thing about spine to me is its independent animation editor. I just want to use spine for making animation source files. But for playing animation in unity runtime, I like animancer now! I think animancer is the best runtime animation system !!!

    Spine's independent animation editor + animancer's unity runtime animation system = perfect!

    So is it possible to use them both together? (⊙﹏⊙)
     
  8. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    If the Spine editor can export Animation Clips that can be played by an Animator Controller, then Animancer will be able to play them as well.
     
  9. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    479
    I just picked up the Pro version and had a question. What would my release build look like? Would it simply be code or a dll dependency or something else?



    Forget it. Just noticed the Animancer.dll in the docs.
     
    Last edited: Apr 15, 2021
  10. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    The DLLs are only for Animancer Lite as explained here.

    What your final build looks like depends on which build system you're using and which platform you're building for. I believe the old build system for Windows would preserve your assembly structure but the new IL2CPP system fully recompiles everything into native code anyway. Android builds have everything compiled into an APK.
     
    jnbbender likes this.
  11. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    479
    Haven't gotten to that part yet :) Thanks. Loving this by the way.
     
  12. stain2319

    stain2319

    Joined:
    Mar 2, 2020
    Posts:
    417
    I have what is probably a pretty newb question, but I am getting rather confused by the docs which either make this seem more complicated than I think it should be, or I am just missing something (which is likely..)

    I should add that I have been all over the documentation but I am TERRIBLE at trying to suss out how to do something by looking at someone else's Example Scenes so forgive me if I've missed something obvious in the examples. It's a lot to dig through the full scenes and code when I think what I am trying to do should be fairly simple?

    I have a character controller I'm working on which works with a finite state machine (which I am also creating myself), it's all pretty simple ultimately, and I am trying to integrate Animancer into it. So far it's going well but I decided I wanted to get a little more advanced and use a Mixer to basically create a 'blend tree' for movement animations and I just can't quite figure out what I am supposed to do.

    - I created a new MixerTransition2D Asset
    - I set it to Directional type
    - I added my 9 anims (8 movement directions + idle)
    - I set my thresholds appropriately as one would in a blend tree representing the axes like 0,0 .. 0,1 ... 0, -1 .. and so forth (9 of them)

    in my Character script I created a place to put it:

    public MixerTransition2D walkAnimsMixer;

    in the Inspector I dropped the MixerTransition2D asset into the slot.

    ... but how do I actually access the animations? It's a 3d controller so I am using X/Z instead of X/Y for the axes but essentially all I want to do is figure the X/Z movement axes -- I am using keyboard control so it will always be fully 0 or 1 in either direction.

    So basically I thought I would be able to do something like, in my "Walking State" :

    walkAnimsMixer.Play(XAxis, ZAxis);

    but obviously there is more to it, so what am I missing? :)
     
    nobluff67 likes this.
  13. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    What you want is mostly covered by the Directional Blending example.

    Basically:
    • To play your movement mixer:
      animancer.Play(walkAnimsMixer);
    • Then to control its blending parameters:
      walkAnimsMixer.Transition.State.Parameter = new Vector2(XAxis, ZAxis);
    The main difference is that the example is using a transition directly (
    MixerState.Transition2D
    ) while you're using a Transition Asset (
    MixerTransition2D
    ) so where the example can access its parameter using
    mixer.State.Parameter
    you need to do it through the transition owned by that asset using
    mixer.Transition.State.Parameter
    .

    If you are going to have multiple characters in the scene all using that same mixer asset, you will also need to store your own reference to the state as explained in the Linear Blending example since the
    mixer.Transition.State
    will only reference the state on the character that most recently played the asset. I'm actually in the middle of trying out an idea that might make that even easier to do, which I'll post shortly if it works.

    Also, if you have any specific questions you run into that don't seem to be answered effectively, please let me know.
     
  14. stain2319

    stain2319

    Joined:
    Mar 2, 2020
    Posts:
    417
    OK, thanks.. I think I get it. :)

    So basically I have a "character" class which serves to manage the states a character is in based on what inputs it is given. there is e.g. WalkingState, RunningState, JumpingState, and so on, controlled by various parameters (character.IsJumping, character.IsRunning, you get the idea..)

    In turn I then have a Player script which takes input from the axes/keyboard and passes it to the Character instance which is attached to the player, e.g. Character.Move(blah), that way I could eventually have different NPC types which can control the characters by giving inputs and so on.

    So basically (simplifying it a bit for the sake of discussion) I have in my Player script -- apologies if my code is not entirely clean as I am just typing this up quickly as an example to help make sure I get it :)

    Code (CSharp):
    1. inputX = Input.GetAxis("Horizontal");
    2. inputZ = Input.GetAxis("Vertical");
    3.  
    And then essentially I pass the results to a function which ultimately passes X,Y,Z values to Character.Move() which moves the character itself.

    the character in turn has MoveX and MoveZ properties which store the direction in which it is moving.

    Soooo if I am getting this correctly;

    - I created the Transition Asset as mentioned, basically PlayerWalkAnims (so later I could have, say, MonsterWalkAnims...) and put my various clips in there.
    - I have a reference to this in my player script, like
    Code (CSharp):
    1.  
    2. [SerializeField] private MixerTransition2D _mixer;
    3.  
    in my Character script I would have e.g.
    Code (CSharp):
    1.  
    2. public MixerTransition2D WalkAnimations {get; set;}
    3.  
    and in the Player script, we have a reference to the character, and do e.g.
    Code (CSharp):
    1.  
    2. playerChar.WalkAnimations = _mixer;
    3.  
    and then finally in my WalkingState which actually handles the input I simply need something like- (leaving out some "irrelevant" code but you get the gist):
    Code (CSharp):
    1.  
    2. private AnimancerComponent anim;
    3. private MixerTransition2D mixer;
    4.  
    5. anim = character.animancercomponent;  // for the sake of simplicity
    6. mixer = character.WalkAnims;
    7.  
    8. anim.Play(mixer);
    9. mixer.Transition.State.Parameter = new Vector2(character.MoveX, character.MoveZ);
    10.  
    have I got the idea?

    Thanks for your help, by the way. I'm still learning C# but this is one of my favorite assets so far..... I hate Animator Controllers.
     
  15. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    Yeah, that sounds right.

    Your structure seems basically the same as what I use, which is explained in the Brains example. Basically a Creature (your Character) which manages the state machine, rigidbody, animations, etc. and a Brain (your Player) which controls the Creature using whatever input, AI, etc.

    One thing I'm not sure about is why you want your Player script to reference the mixer when all it does is pass it to the Character. Why not just put that field in the Character itself?
     
    hopeful likes this.
  16. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    Hey everyone, I've posted a new system for UnShared Transition Assets which aims to solve the issues that Transition Assets have with accessing their State and Events when multiple characters are sharing the same asset. So if you're using any Transition Assets, please check it out and let me know what you think.
     
  17. stain2319

    stain2319

    Joined:
    Mar 2, 2020
    Posts:
    417
    The idea is that different characters could use different animation sets without needing a different underlying character. So essentially I can swap out "Player" with "monster" and keep the animations tied to the "monster" script. It's mostly to keep everything tied to a "type" of character embedded in that "type's" inspector so if I change a creature type I only have to change one script.
     
  18. stain2319

    stain2319

    Joined:
    Mar 2, 2020
    Posts:
    417
    Ok, so this works great! Thanks for that.
    One question I have, if needed I can post a video to help explain it but maybe you know what I'm talking about already.

    If I am moving right, then stop briefly to go idle and then move left, I get a nice smooth transition as the character stops for a moment, puts both feet together in idle stance and then changes direction.

    If I don't stop first and just go from moving right to moving left there is a noticable "skip" as it just swaps from the moving left animation to the moving right animation without "stopping at idle" in between. Its there a way to force that?
     
  19. stain2319

    stain2319

    Joined:
    Mar 2, 2020
    Posts:
    417
  20. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    Variable Target Smoothing would probably do it if you don't mind losing a bit of responsiveness in exchange. Though it could also help give the character a bit of a sense of weight which might be good.

    Otherwise something simple like
    if (Mathf.Sign(currentParameter.x) != Mathf.Sign(newParameter.x)) set the parameter to 0
    should give you one frame of Idle whenever you pass through the center. Or you could use Mathf.Abs to not force that extra frame if the value was already close enough to 0.
     
  21. stain2319

    stain2319

    Joined:
    Mar 2, 2020
    Posts:
    417
    thanks. I will look into that. I made it look a little smoother by mirroring the strafe-right animation instead of using a separate one but that sounds promising.
     
  22. vgatto

    vgatto

    Joined:
    Aug 23, 2015
    Posts:
    3
    I'd like to begin integrating more sophisticated asset management into my project. However, I get a lot of use out of Animancer events and the animation preview window in the editor. Will I lose this if I start loading my animations via addressables or some other library that allows me to do downloading of animation assets?
     
  23. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    I've never used a workflow like that, but I see no reason why it would be a problem.
     
  24. stain2319

    stain2319

    Joined:
    Mar 2, 2020
    Posts:
    417
    I'm really enjoying this asset! Tomorrow I'm going to start exploring the options to use animator controllers for certain states as I think it will be a little easier that way.

    Any tips on a "skid stop" animation for changing directions? I was thinking of basically programming a "dead zone" into the controls so when you switch direction it takes a few frames to "ramp up" and during that time I'll play a skid-stop/turnaround animation depending on which direction was traveled but I'm open to suggestions.
     
  25. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    I've never done anything like that so it might take a bit of experimenting to find something that looks good, but it sounds like you have a good place to start.
     
  26. stain2319

    stain2319

    Joined:
    Mar 2, 2020
    Posts:
    417
    Cool I'll let you know. I'm still deciding on whether I should try using a rigibody to take advantage of inertia and velocity or not. Right now I'm leaning towards not.
     
  27. KeyToTruth12

    KeyToTruth12

    Joined:
    Oct 1, 2020
    Posts:
    1
    Hey there, came across this plugin when I was having trouble using animator controllers. I want to ask a question regarding my project; everything works with the Animancer itself, but I'm wondering since I'm using the Unity Recorder package to record a humanoid model's transform, and then saving it as an animation clip for example [animResult]. This clip is assigned to the Play Animation script (from the examples) so that when I push the space key, it'll play the recorded transform animation that I already recorded beforehand; this is all done during runtime, by the way.
    upload_2021-4-27_10-12-53.png

    Everything is fine and well during a fresh recording, but when I tried to do a second recording and played that result, it instead played the first recording instead of the new one. My guess that it doesn't overwrite the animation clip during runtime because when I restarted play mode, it played the new recorded animation clip. I'm not sure if this is related to Unity itself, but if there's any workarounds to this without me having to restart the play mode, that'd be really helpful.

    Thanks in advance!
     
  28. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    Destroying the AnimancerState and recreating it after modifying the clip might work, but the engine probably isn't expecting the clip to change while the game's running so it might not work. If it doesn't, you'd just have to save a new clip instead of overwriting an existing one.

    But if you're trying to use that capability in runtime builds it won't work anyway because you can't create new AnimationClips at runtime and the Unity Recorder is only meant for Play Mode.
     
  29. stain2319

    stain2319

    Joined:
    Mar 2, 2020
    Posts:
    417
    Is there any issue with having states change too quickly that you know of? I will try to post some code/videos later on but essentially, I'm using my own FSM where each state has its own animation.

    Sometimes when switching states very quickly in a row - like jumping or dodging repeatedly - the animation from the previous state will play again (or sometimes none at all).

    I can tell that the actual state in my statemachine changes because the character actually jumps in the air or dodges sideways as defined in the state itself, but seems like the Animancer.Play either doesn't fire or fires the wrong clip. So the character will be walking in the air, or dodge sideways without playing the "roll" animation. If I pause a beat before hitting the keys to perform the action then it seems fine but if I spam the jump key, then like every few jumps the jump animation doesn't play.
     
  30. stain2319

    stain2319

    Joined:
    Mar 2, 2020
    Posts:
    417
    So here is some relevant code - maybe I am doing this wrong but any advice would be appreciated.

    Basically when you enter a new state it plays an Enter() function which, for example in the Idlestate does something like:

    Code (CSharp):
    1.  private ClipSet idleAnims;
    2.     private ClipSet angryAnims;
    3.     private AnimancerState animState;
    4.     private AnimancerComponent animancer;
    5.     private Character.MoveState currState;
    6.     private Character.MoveState nextState;
    7.  
    8.     public override void Enter()
    9.     {
    10.         base.Enter();
    11.         idleAnims = character.animations.idleAnims;
    12.         angryAnims = character.animations.angryAnims;
    13.         animancer = character.GetComponent<AnimancerComponent>();
    14.         idleIndex = Random.Range(0, idleAnims.clips.Length);
    15.         animState = animancer.Play(idleAnims.clips[idleIndex], character.AnimTransTime);
    16.         timeInPose = timeInState = 0f;
    17.         isAngry = false;
    18.         currState = nextState = Character.MoveState.Idle;
    19.         character.WhichJump = Character.JumpType.Idle;
    20.         character.Move(new Vector3(0, -2f, 0));
    21.        
    22.     }
    A ClipSet is a scriptableobject which is basically just a list of animations. I have about 6 idle animations and 3 "frustrated emotion" animations, in this state I fade between them every so often for variety and then if you leave the player too long, one of the "frustrated" animations plays. But you can see essentially how I am using the Animancer component and AnimancerState...

    in my jumping state, when you enter it just does:

    Code (CSharp):
    1.   public override void Enter()
    2.     {
    3.         base.Enter();
    4.         currState = nextState = Character.MoveState.Jumping;
    5.         jumpAnim = character.animations.jumpAnim;
    6.         animancer = character.GetComponent<AnimancerComponent>();
    7.         jumpType = character.WhichJump;
    8.         jumpHeight = character.JumpHeight;
    9.         moveSpeed = character.LastGroundSpeed;
    10.         if (moveSpeed.y <= 0f)
    11.         {
    12.             moveSpeed.y = 0f;
    13.         }
    14.         verticalVelocity = moveSpeed.y;
    15.         groundedTimer = 0.2f;
    16.         if (!animancer.IsPlayingClip(jumpAnim))
    17.         {
    18.             animState = animancer.Play(jumpAnim, 0f);
    19.         }
    20.         verticalVelocity += Mathf.Sqrt(jumpHeight * 2 * gravity);
    21.     }
    So basically I put it this way to smooth things out a little so if it's already playing the jumping animation and you jump again, it will not restart the animation -- this is for weird double-jump-on-a-ramp situations I was having and it seems to work pretty well.

    But here is the result - note you can see sometimes when I jump, the "walk" state is playing instead.

     
  31. stain2319

    stain2319

    Joined:
    Mar 2, 2020
    Posts:
    417
    possibly relevant (forgot to add) is that if I explicitly call animState.Stop() in the Exit() method of my state it seems to help fix this issue, at the cost of being very "jerky" when you land from the jump.

    EDIT: I think I found the key but not sure if there's a workaround. If I set the transition time to 0.0f in the Walking state, the issue seems much harder to reproduce (possibly fixed, I'm still testing). But it seems like, perhaps, if I try to transition from Walking back to Jumping during the 0.2f time that we are still transitioning to the walking animations that is what causes the issue.
     
  32. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
  33. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,681
    Hi @Kybernetik!
    I want to do a couple of things, that are proving a little tricky and I am hoping you can help.


    I want to get the current and last frame of an animation. So be it through Animancer or Animator, I can not quite figure it out.

    THANKS!
     
  34. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    I'm not sure what you mean by "get" the current and last frame, but if you just want to set the animation to the end all you need to do is
    animancer.Play(clip).NormalizedTime = 1;
     
  35. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,681

    So on that logic, would animancer.Play(clip).NormalizedTime = 0.5f; start it at half way?
    Thanks.

    edit.
    Is there a way I can get the current NormalizedTime? Or can I only set it?
     
    Last edited: May 11, 2021
  36. Robot_Nachos

    Robot_Nachos

    Joined:
    Mar 27, 2015
    Posts:
    3
    Hey @Kybernetik quick question, I'm kinda unclear on how to get multiple input scripts to share the same input buffer.

    My specific use case, if it's important is that I'm using 06 Weapons as a base, but I want to be able to equip multiple weapons, each of which owns its own inputs.
     
  37. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    @renman3000 Yes, 0.5 is half way. The Play method returns an AnimancerState which you can get and set the details of however you like. The States page explains the various other ways of getting and creating them.

    @Robot_Nachos What exactly is the problem you're running into? If you just put the input buffer somewhere accessible to all the scripts then they should all be able to use it normally (though they're going to interfere with each other if they try to use it at the same time).
     
  38. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,681
    @Kybernetik
    Hi, so I got the NormalizedTime working great! However, my call to an event, onEnd is not, this is my code. The result at the moment is: no call to the function, console log shows nothing.
    Code (csharp):
    1.  
    2. void playAnim(){
    3. crntState = animancer.Play(clipTo);
    4.  crntState.Events.OnEnd = animEnded;
    5. }
    6. void animEnded(){
    7. ///I am not getting signal here.
    8. print("ANIM ENDED");
    9. }
    ///nor is this..
    Code (csharp):
    1.  
    2. void playAnim(){
    3.      crntState.Events.Add(1f, animEnded);
    4. }



    --------------------
    Also, I have noticed this:
    I decided to watch the NormalizedTime value, in Update.... however the value returned seems to toggle each frame between normalizedTime & 1 - normalizedTime. So if normalizedTime = 0.75f, next frame shows 0.25f.

    Any ideas?

    Code (csharp):
    1.  
    2.     private void Update()
    3.     {
    4.  
    5.  
    6.         if (crntState != null)
    7.         {
    8.  
    9.  
    10.  
    11.             float timeCrnt = crntState.NormalizedTime;
    12.             print("===== time crnt = " + timeCrnt);
    13.  
    14.  
    15.  
    16.  
    17.         }
    18.  
    19.  
    20.     }
    21.  





    --- at the moment, the only solution while does work, might not be the most native to Animancer....
    Code (csharp):
    1.  
    2.     private void Update()
    3.     {
    4.  
    5.  
    6.         if (crntState != null)
    7.         {
    8.  
    9.  
    10.  
    11.             float timeCrnt = crntState.NormalizedTime;
    12.             if(timeCrnt > 1)
    13.             {
    14.                 animHasCompletedLoop();
    15.             }
    16.  
    17.  
    18.  
    19.  
    20.         }
    21.  
    22.  
    23.     }
    24.  
     
    Last edited: May 11, 2021
  39. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    I can't see anything wrong with that first code block. Just make sure that playAnim() is actually getting called and that you aren't interrupting that animation by playing something else before it reaches the end (end events occur based on the time, not when the state is interrupted).

    Those NormalizedTime values you're logging suggest that you have multiple objects in the scene with that script attached. Try using
    Debug.Log("===== time crnt = " + timeCrnt, this);
    so that when you click on the console message it will highlight the object the message came from.
     
    renman3000 likes this.
  40. Robot_Nachos

    Robot_Nachos

    Joined:
    Mar 27, 2015
    Posts:
    3
    Oh, nmv I was grabbing the wrong brain.
     
  41. ping07

    ping07

    Joined:
    Jan 25, 2021
    Posts:
    2
    From the example, I can only see the fade-in effect of the animation, how to set the transition between different animations, such as one-to-many or many-to-one different fade-in and fade-out.Thank you.
     
  42. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
  43. ping07

    ping07

    Joined:
    Jan 25, 2021
    Posts:
    2
    Sorry, maybe I didn’t explain it clearly. Is it possible to implement these in the editor, visual editing, because my artist wants to edit these transitions, I saw ClipState.Transition, but this interface can only modify Transition itself in the editor.
     
  44. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    If you want to use an interface like Animator Controllers, you can always use Controller States to play actual Animator Controllers in Animancer.

    But if you want a more flexible system that uses Animancer's transitions then we need to solve those problems in the post I linked to figure out how such a system should be implemented.
     
  45. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    Hey everyone, I just posted a New Exit State Event System for setting up callbacks to be triggered when a state is exited (unlike End Events which are based on the state's time). As mentioned in the post, I have no use for it myself since my FSM system already has OnExitState methods, so any feedback would be appreciated.

    Feedback on the UnShared Transition Assets system would also be great (and more important since it addresses a far more common problem).
     
  46. mchung123

    mchung123

    Joined:
    Jul 4, 2017
    Posts:
    37
    Hey Kybernetik!, quick question you seem to be a subject matter expert on this, is there a way to load a .anim file from animancer FROM a path that isn't the Resources.Load bundle. I want to allow my users to import .anim legacy clips, or it seems like .anim files are just yml files?
     
  47. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    Not directly, but if you compile them into Asset Bundles, you can load them and they function basically like the Resources system.

    Also, Animancer can't play legacy animations, but you can use the Toggle Legacy context menu function to make them usable.
     
  48. KD_W

    KD_W

    Joined:
    Feb 9, 2015
    Posts:
    19
    Hi Kybernetik. If I have multiple chracter using the same LinearMixerTransition. If one changes
    Transition.State.Parameter, do others change as well? Because I have a weird animation glitch when multiple character playing the same LinearMixerTransition. BTW, greate asset, absolutelylove it!!
     
  49. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    Last edited: May 17, 2021
  50. KD_W

    KD_W

    Joined:
    Feb 9, 2015
    Posts:
    19
    Thank you, that fixed it. :D