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. NowWeWake

    NowWeWake

    Joined:
    Apr 20, 2020
    Posts:
    4
    Kybernetik, I have two Animancer State Machine / game design questions.
    I am a beginner and have learned a lot by working through your examples. Currently, I am using the 3D Game Kit example as a base and am trying to adapt my third person shooter prototype to use the Animancer State Machine and to replace my Mechanim Animator Controllers with Animancer mixers. My current design is below.

    The text in italics represents what the appropriate components are called in your 3D Game Kit Example; which I have tried to follow closely. My two questions:

    1) The LocomotionState is responsible for adjusting the parameter of a LinearMixerTransition to play the appropriate Walk / Run / Sprint animation. It also correspondingly adjusts the speed of the movement inside the PlayerCharacter. It responds to Game Events raised by the InputController. However, when you walk / run / sprint fully in one direction (by holding down a key), then quickly turn in the opposite direction, the StateManager quickly transitions from Locomotion to Idle to Locomotion, because, for an instant, your move is zero (when you hard switch directions). After this switch, the LocomotionState obviously goes back to its default speed (its OnEnable speed), as it has forgotten that it was walking / running / sprinting a second ago (even though you are still holding down the key). The only fix I have for this is to have a series of bools / enum flags in OnEnable to check the previous locomotion state and then enter it again... but this switch statement seems to defeat the purpose of having states to begin with? What am I missing here? Is there a better way to handle this?

    2) The InputController raises Scriptable Object Game Events for certain button presses (in this case, when you start pressing the button for sprinting / walking and when you release them). The appropriate states listen only to the events they care about, (e.g. an Airborne state wouldn't listen for the Sprint event) and they don't listen when they're inactive. This does mean creating an event for each button press or button press combination. Am I missing a simpler pattern to use here?

    Thank you for any insight you can provide.
    CurrentDesign.jpg
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    1) Maybe something like this?

    Code (CSharp):
    1. [SerializeField]
    2. private float _Deceleration;
    3.  
    4. private float _PreviousExitTime = float.NegativeInfinity;
    5.  
    6. private void OnEnable()
    7. {
    8.     var timeSinceExit = Time.timeSinceLevelLoad - _PreviousExitTime;
    9.  
    10.     MixerSpeed = Mathf.MoveTowards(MixerSpeed, 0, _Deceleration * timeSinceExit);
    11. }
    12.  
    13. private void OnDisable()
    14. {
    15.     _PreviousExitTime = Time.timeSinceLevelLoad;
    16. }
    2) I quite like the way I set up input in the 3D Game Kit example's KeyboardAndMouseBrain because it keeps all the input management in one place and avoids making any of the creature states only usable by the player so that they can be used by other creatures as well.
     
  3. NowWeWake

    NowWeWake

    Joined:
    Apr 20, 2020
    Posts:
    4
    1) This is excellent, thank you.
    2) I guess I was thinking that each state must be allowed to have its own response to buttons, but that's flawed. I'll follow what you did in the KeyboardAndMouseBrain.
    Thanks again.
     
  4. NowWeWake

    NowWeWake

    Joined:
    Apr 20, 2020
    Posts:
    4
    Just an update:
    1) Got this working!
    2) By copying the way you handle input events in KeyboardAndMouseBrain, I no longer have to worry about whether or not the Locomotion state is active. This solved a few problems. Thanks.
     
  5. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,033
    Lately I had noticed a huge drop in fps when I had certain objects selected and I think I narrowed it down to the Animancer inspector, because removing the component I get all the fps back.
    This is happening even if the inspector is folded, don't know why. Can you have a look?
    I think this wasn't happening with animancer 3.0.
    I think it's the state inspector causing the slow down.
    If it helps I am playing animator controllers, not single clips.
     
  6. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    Custom Inspectors don't get executed when collapsed so the state Inspector can't be the problem if it's still happening while collapsed.

    I don't remember making any significant changes to the Inspector in the last few versions, but if you Right Click on a state and go into the Display Options you can disable Repaint Constantly for it to repaint at a slower rate.
     
  7. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,033
    Thanks for the tip.
    I think that feature is the culprit, that or there is a bug in Unity.
    I unchecked "Repaint Constantly" and got my fps back but if I collapse the component inspector the fps slow down again, it's like it's running even when collapsed.
     
  8. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,033
    I get what it's happening now. I have many components in that gameobject and I think that RequiresConstantRepaint force all its editor to refresh even when collapsed, and there are some which I made which are particularly heavy.
    Also that same method return true even when collapsed because of the last line.
     
  9. jeango

    jeango

    Joined:
    Dec 19, 2012
    Posts:
    106
    Hey all, I'm new to Animancer and loving it. It does solve a lot of gripes I have with Mecanim :)

    However I'm getting a warning inside my Animancer Component that I don't quite understand.

    it says the following:

    Some of the properties animated by 'ClipState (Idle-DownRight)' do not exist in the Rig of 'Charlie' so they will have no effect.
    - The AnimationType of the 'Idle-DownRight' animation is Generic while the 'Charlie' Rig is Sprite.
    - This message has been copied to the clipboard (in case it is too long for Unity to display in the Console).
    - 0 of 3 bindings do not exist in the Rig: [x] = Missing, [o] = Exists
    > [o] scale

    So apparently what I understand is that Animancer doesn't like the fact that I'm animating the scale property of my gameobject. All I'm doing is setting the x scale of the root object to flip my gameobject when moving in a leftwards direction.

    There's two things I don't understand:
    - What is an Animation Type, where is it defined. When I check my animation asset's inspector there's no such thing.
    - I suppose Animancer expects my animation to be a Sprite Animation because I'm using a DirectionalAnimationSet. But it makes a lot of sense to me to flip the root object's scale. Can DirectionalAnimationSet only animate a sprite renderer's "sprite" value?

    Note that the flip actually works, so the warning is even weirder in my eyes, and makes me wonder even more why it's there.
     
  10. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    Animation Types are an extension of Unity's Rig types which Animancer uses to try to help you identify potential issues when playing an animation on the wrong type of character. It's just an attempt to give more information about why an animation might not be working.

    Since it says "0 of 3 bindings do not exist", everything should work fine and it's simply misidentifying Idle-DownRight since it animates the Transform. The separation between Generic and Sprite animations is entirely arbitrary based on what they animate (Unity treats them all as Generic) so I'll just need to modify it to not show the warning when there is a type mismatch but all the bindings are fine.

    If you try to play a more complex animation on the wrong character (such as one of the Spider Bot animations from the examples on the Default Humanoid character) then the warning would say that most of the bindings don't exist because it's trying to animate stuff that doesn't exist on that character. Or if one of your character's bones is named wrong then it would help you figure that out instead of just outright not working with no explanation of why.

    Since all you're doing is flipping the sprite, you could animate the Flip X toggle in the SpriteRenderer instead of the Scale.x. That would be a bit quicker to set up and should avoid the warning, but if you already have it working then there's no real need to change it.
     
  11. jeango

    jeango

    Joined:
    Dec 19, 2012
    Posts:
    106
    Thanks for the quick response. I'm doing the x scaling instead of a flip because I don't just want to flip the sprite, I also want to flip other children of the root (colliders, spawners, ...). But thanks for clarifying all this. I was also wondering why it said that 0/3 thing :)

    I love your assets, been using UltEvents for a long time and Weaver at some occasions. Great stuff
     
    Kybernetik likes this.
  12. Khalreon

    Khalreon

    Joined:
    May 25, 2014
    Posts:
    5
    Hello, the animation preview window was giving errors when i tried to pan the camera, i fixed it and added one extra; recenter command.
    Code (CSharp):
    1. private void HandleMouseInput(Rect area)
    2.             {
    3.                 var currentEvent = Event.current;
    4.                 switch (currentEvent.type)
    5.                 {
    6.                     case EventType.MouseDown:
    7.                         _IsDraggingCamera = area.Contains(currentEvent.mousePosition);
    8.                         if (_IsDraggingCamera)
    9.                             currentEvent.Use();
    10.                         break;
    11.  
    12.                     case EventType.MouseUp:
    13.                         if (_IsDraggingCamera)
    14.                         {
    15.                             _IsDraggingCamera = false;
    16.                             currentEvent.Use();
    17.                         }
    18.                         break;
    19.  
    20.                     case EventType.MouseDrag:
    21.                         if (_IsDraggingCamera)
    22.                         {
    23.                             if (currentEvent.button == 1)// Right Click to Rotate.
    24.                             {
    25.                                 var sensitivity = Screen.dpi * 0.01f * Settings.RotationSensitivity;
    26.  
    27.                                 var euler = CameraEulerAngles;
    28.                                 euler.x += currentEvent.delta.y * sensitivity;
    29.                                 euler.y += currentEvent.delta.x * sensitivity;
    30.                                 CameraEulerAngles = euler;
    31.                             }
    32.                             else// Other to Move.
    33.                             {
    34.                                 var previousRay = Camera.ScreenPointToRay(currentEvent.mousePosition - currentEvent.delta);
    35.                                 var currentRay = Camera.ScreenPointToRay(currentEvent.mousePosition);
    36.  
    37.                                 var previousPosition = previousRay.origin + previousRay.direction * CameraZoom;
    38.                                 var currentPosition = currentRay.origin + currentRay.direction * CameraZoom;
    39.                                 var delta = currentPosition - previousPosition;
    40.                                 delta = Vector3.Reflect(delta, Camera.transform.right);
    41.  
    42.                                 if (float.IsNaN(CameraPosition.x)) CameraPosition = previousPosition;
    43.                                
    44.                                 CameraPosition += delta * Settings.MovementSensitivity;
    45.                             }
    46.  
    47.                             currentEvent.Use();
    48.                         }
    49.                         break;
    50.  
    51.                     case EventType.ScrollWheel:
    52.                         if (area.Contains(currentEvent.mousePosition))
    53.                         {
    54.                             CameraZoom *= 1 + 0.03f * currentEvent.delta.y;
    55.                             currentEvent.Use();
    56.                         }
    57.                         break;
    58.                     case EventType.KeyDown:
    59.                         if (currentEvent.keyCode == KeyCode.F)
    60.                         {
    61.                             CameraPosition = Vector3.zero;
    62.                             currentEvent.Use();
    63.                         }
    64.  
    65.                         break;
    66.                 }
    67.             }
     
    ratking likes this.
  13. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    Thanks. I've added a bit more to it to use the default position instead of zero and to reset the zoom and rotation as well. I'll probably be back to working on another minor Animancer update in the next few weeks.
     
    ratking likes this.
  14. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    336
    I've been using Animancer with a per-hand mask setup (VR game where each hand has its own layer/mask), and I've noticed that I'm unable to use the same AnimationClip for more than one hand, due to how the keys are created per animation clip. I'm thinking that maybe the state keys should factor in the layer they are being played in, so that we can use the same clip for more than one layer without issue. I'm just duplicating AnimationClips manually for now, but ideally I wouldn't have to do that.
     
  15. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
  16. trueh

    trueh

    Joined:
    Nov 14, 2013
    Posts:
    74
    Hello:

    I am using Animancer Pro with the FSM. I would like to have different transitions targetting the same animation clip in a single state. The state would choose the correct transition based on the previous state/animation clip. What is the correct way of doing it? I am currently hardcoding it and it works, but I find it a little cumbersome.

    I mean. I have a Walking state, but the transition should be different depending on the previous state. If the previous state is Idle, the transition is X, but if the previous state is jumping, the transition is Y and so on. This is something you can easily do with an Animation Controller, but I do not want to use Animation Controllers for it.

    Thanks in advance.
     
  17. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    Take a look at the Interrupt Management example, particularly the Action Types section at the end. You could do something similar to that, but using CanEnterState instead of CanExitState.

    Using CanEnterState isn't really ideal though since you should really be playing animations in OnEnterState (or OnEnable if you're using a StateBehaviour). That's given me an idea of how I might rework the FSM system to make that sort of thing easier though, so I'll play around with it for a bit and post an experimental package in a few minutes.
     
  18. trueh

    trueh

    Joined:
    Nov 14, 2013
    Posts:
    74
    Thank you for your fast response.

    I will have look at the example. Let me know when your experimental package is available so I can give it a try :)

    Regards.
     
  19. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    Hey everyone, I've just posted an Idea for a potential change to the FSM system which I'd like to get feedback on. I'm currently in favour of the change, but I can easily imagine some programmers thinking the disadvantages aren't worth it so please check it out and let me know what you think.
     
    tcsweetser likes this.
  20. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    Hey @Khalreon, I just wanted to thank you for your review and was wondering if you could tell me a bit more about what you meant by "errors, bugs and things you will say ohhh..." and why you think it seems "unfinished"? I don't think it's fair to call version 5.1 an "alpha" without any real explanation beyond the one bug you told me about.
     
  21. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    Hey everyone, I've added another new feature I'd like to get some feedback on: Time Synchronisation Groups. The idea was to make a simpler synchronisation system for sprite animations where Mixers aren't necessarily the most convenient solution.
     
  22. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    Last edited: Sep 16, 2020
    ratking and Flavelius like this.
  23. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,033
    Hi @Kybernetik, could be possible to add an ID to controllerstate and use that in the inspector?
    I have multiple controller states playing and right now it's very hard to debug cause the inspector call all of them "Animancer.Float1controllerstate+Transition".
     
  24. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    You can use SetEditorName (SetName if you aren't using v5.2 yet) to give them whatever name you want.
     
    00christian00 likes this.
  25. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,033
    Thanks! Now I can finally understand what is wrong with my code :)
     
  26. MrSynce

    MrSynce

    Joined:
    Nov 25, 2018
    Posts:
    5
    Is in this plugin an option for "write defaults" like in Animator? I need it to be unchecked, so after playing an animation it non animated properties in next animation doesnt return to the default.
    More in depth.
    I have one frame direction changing animations ( that change position of sprites and order in layer in the prefab etc.) And i want to keep it so end of animation doesnt reset it. Is there any option or i need to blend this animation with the next one ?, i couldnt find any info about it in documentation, blending overcomplicates it cuz i would need to store more info in this script.
     
  27. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    Unfortunately, there doesn't seem to be a way to properly implement that behaviour in the Playables API. The best I've been able to come up with is a hacky workaround that assumes a value of 0 means it's not being animated:
    Code (CSharp):
    1. public float animatedValue;
    2. private float _PreviousValue;
    3.  
    4. private void LateUpdate()
    5. {
    6.     if (animatedValue == 0)
    7.         animatedValue = _PreviousValue;
    8.     else
    9.         _PreviousValue = animatedValue;
    10. }
    You can just replace
    animatedValue
    with whatever property it is you want to keep and it will make it stay at that value whenever the animations try to set it to 0.
     
  28. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    You might also be able to achieve what you want by putting the animation on a different Layer. For example, if you play most of your animations on Layer 0 and DirectionChange on Layer 1, you could simply set the Weight of the DirectionChange state or layer to 1 when you want it active and 0 when you want it inactive, then it will stay at that value regardless of what you are doing on Layer 0.
     
    Last edited: Sep 17, 2020
  29. alexandrebrown

    alexandrebrown

    Joined:
    Apr 8, 2020
    Posts:
    2
    Hello, we are working on a 3rd person fighting game where the character can have A LOT of different weapons and equipment parts. We use Puppet master & Final IK.

    We are investigating different approaches for animations and from what we observed so far we are afraid that going with Mechanim might not be really modular and might be painful.

    From our understanding we would need to create a lot of animations to cover different combinations ex:
    ex:
    - LeftSwordRightShield
    - LeftSwordRightMace
    - LeftSwordRightSword
    - LeftSwordRightAxe
    - LeftSwordRightSpear
    - LeftSword
    - RightSword
    - LeftMaceRightShield
    - LeftMaceRightMace
    - LeftMaceRightSword
    - LeftMaceRightAxe
    - LeftMaceRightSpear
    - LeftMace
    - RightMace
    ...

    We are also not a big fan of magic strings and Animation Controller. (subjective)

    We are wondering, would Animancer allow us to easily manage our animations in a modular way?
    For instance would we be able to have animations only for each weapons and each arms?
    ex:
    - LeftSword
    - RightSword
    - LeftMace
    - RightMace
    ...

    Note : For this example let's take into account that LeftSword animation would be when a sword is equipped in the left hand and the animation would do a top left to bottom right slash animation. On the flip side, RightSword would be the opposite so when a sword is equipped in the right hand and would be a top right to bottom left slash animation for instance)

    Would we then be able to play the "LeftSword" animation without caring about what is equipped in the right hand? Would we be able to create animations that are specific to an arm so that we don't have to care about all the combinations ?
    Would it be possible to only have 1 animation for left and right if the animation is pretty generic like a top down slash?

    Thanks
     
    Last edited: Sep 18, 2020
  30. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    The Weapons example would be a good starting point for you since it shows how you can have each individual weapon define its own animations entirely separate from the character's other animations.

    If you are using a Humanoid Rig, you can set animations to be mirrored in their import settings so if you need both sides you can just have two copies of the animation and mirror one of them. Then you could use something like the Weapon class with separate fields for left and right variations of each animation type.

    The number of animations you actually need to make will need to be decided on a case by case basis as you actually see things in action. A "RightHandSwordSlash" animation might look alright regardless of what you have in your left hand, but moving the left hand appropriately for a shield might look silly if you are currently unarmed so you might end up needing two or three variations along the lines of "RSword-LUnarmed-Slash", "RSword-LWeapon-Slash", and "RSword-LShield-Slash". There's really no way of knowing those things before you try them and the answers would be very different depending on the type of game you are making.
     
    tcsweetser and alexandrebrown like this.
  31. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,681
    Hi there,
    I would like to use gravity on a humanoid, but if I use a capsule collider, he/she falls over.

    What should I do to insure my humanoid stays upright, yet bets physics?
    *a box collider does alleviate this, but creates an unrealistic event, when I do want him to fall into a hole.
    ??
     
  32. Kybernetik

    Kybernetik

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

    Khalreon

    Joined:
    May 25, 2014
    Posts:
    5
    Hello can you add RemoveCallback() function? AddCallback exists but i would also want to remove callback whenever i want. SetCallback doesn't work because i might have multiple objects listening to the callback and i don't want them to lose connection. Or is there another way i can do this setup in current update? Without making an extra mono to manage that.

    Edit: Oh nevermind i guess i could get a copy of the current event data add new callback and set it again. But i guess it would be easier just having a RemoveCallback() option
     
    Last edited: Sep 23, 2020
  34. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
  35. GamerXP

    GamerXP

    Joined:
    Mar 22, 2014
    Posts:
    74
    Just found this system today. Important question - is it possible to play Timeline's clip instead of AnimationClip? I, pretty much, abuse MecAnim's state machine to play Timeline animations instead of normal ones using custom StateMachinBehavior. If I can play them here directly - it will be really nice. Default animations are really lacking in terms on what they actually can animate.
     
  36. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
  37. GamerXP

    GamerXP

    Joined:
    Mar 22, 2014
    Posts:
    74
    Oh, nice. Final question then - is it possible to have something like this
    upload_2020-9-24_17-15-57.png
    But for timeline window? Just a feature to quickly swap edited timeline animation? It's one of the things that make it hard to work with Timeline animations - you have to swap them manually in Timeline component. Well, it was also required to properly bind timeline's tracks to prefab.
    I somehow doubt it's possible since you can't modify window's code, but do you have any ideas on how to implement that? I'm actually waiting for new animation system that should expand normal animations to work similar to timeline (probably), but if Animancer can make working with timelines easier - it's worth trying it instead I guess.
     
  38. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    Unity 2018 or so added the IAnimationClipSource interface to let scripts add animations to the Animator window, but I'm pretty sure there's nothing similar for the Timeline window. You might be able to achieve something useful by making an EditorWindow that uses AssetDatabase.FindAssets("t:TimelineAsset") to get all the Timeline Assets in your project so you can display a button to select whichever one you want. Or if you have a look at the source code of the Timeline window, you might be able to set the asset it's showing with reflection.
     
  39. GamerXP

    GamerXP

    Joined:
    Mar 22, 2014
    Posts:
    74
    I see. Sounds annoying, but doable I guess...

    BTW. Found "Transition Preview" window. Used it to preview that Knight's timeline animation. And Unity 100% crashes when I press "Play Transition" button. I tried 2019.4 and 2020.2 - same thing. Is it broken?
     
  40. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    I just checked 2019.4 and 2020.1 and it worked fine. Even if it didn't, any code that can crash Unity should be reported to them as a bug.

    Does is play properly if you run the scene?

    Try previewing the animations in the Basics/Sequence Coroutine example.

    Also, use the menu button in the top right of the Console window to open the Editor Log which might tell you something useful after it crashes.
     
  41. GamerXP

    GamerXP

    Joined:
    Mar 22, 2014
    Posts:
    74
    It plays fine in runtime.
    SequenceCoroutine examples works fine. Only one crashing is Timeline of Platformer example.
    It crashes all the time in the middle of second cycle of Idle animation during preview.

    And Editor Log.. well, it doesn't say much to me

    Got a SIGSEGV while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries
    used by your application.

    And some random numbers.
     
  42. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    I see it now, I only tried going to a specific time rather than actually playing it. It's definitely a Unity bug so I'll report it to them. Might be an Animancer bug too, but it's really hard to debug crashes in the Playables API because there are no useful error messages as you saw.
     
  43. GamerXP

    GamerXP

    Joined:
    Mar 22, 2014
    Posts:
    74
    I wish we could override some package files directly or something like this. If I modify them directly - it make it pretty hard to update them later since they are not normal git repos. Well, maybe there is some way to make them as git repos, but I just don't know how?
    Anyhow:
    upload_2020-9-25_14-35-43.png
    Tried replacing that not-so-useful button with timeline animation selector. It searched for ITimelineClipSource interfaces in PlayableDirector hierarchy and makes this list. Then it swaps active asset on PlayableDirector.
    Made it with AssemblyDefenitionReferences
    upload_2020-9-25_14-37-23.png
    Only issue is that you have to copy Timeline package to Packages folder to make it editable and remove original TimelineWindow_Breadcrumbs file so it won't conflicts with mine. But it's pretty annoying issue anyway...

    Still, there is 1 other issue remaining - filling bindings in Transition class. I didn't check it yet, but does it fill them automatically or you have to specify everything manually? Maybe it's possible to automate it by copying data from PlayableDirector if it's not?
     
  44. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    Last I heard, there was no easy way to modify packages without copying them like you did.

    I'm not sure what you mean by filling the bindings automatically. It can't just copy data from a PlayableDirector because it doesn't have a reference to one (because it doesn't need one).
     
  45. GamerXP

    GamerXP

    Joined:
    Mar 22, 2014
    Posts:
    74
    Was there? I tried googling and found nothing.

    I mean this:
    upload_2020-9-25_14-51-52.png
    There is Bindings list, and Timeline also require bindings for some tracks (it stores them in PlayableDirector). Does it fills them automatically with GetComponent if something is missing when you try to play them in runtime?
     
  46. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    No, you misread what I wrote.

    That Bindngs array is equivalent to the Bindings array in a Playable Director. They serve the same purpose.

    No, it doesn't use GetComponent for missing references and I'm pretty sure Playable Directors don't either.
     
  47. GamerXP

    GamerXP

    Joined:
    Mar 22, 2014
    Posts:
    74
    I guess I need to make something to copy data to Transition class automatically.

    Also:

    I'm getting

    MissingMethodException: Cannot create an abstract class 'Animancer.MixerState+TransitionDrawer'.

    When trying to see inspector of Linear Locomotion Mixer Transition
     
  48. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    If you have Odin Inspector then it's probably coming from that. Otherwise, which Unity version are you using and is your field just a regular LinearMixerState.Transition?
     
  49. GamerXP

    GamerXP

    Joined:
    Mar 22, 2014
    Posts:
    74
    Yes, I got Odin Inspector installed. I removed it and it did nothing - still getting same error. Here, I attached call stack there, though I doubt it got any useful info other than first line.

    And I'm using 2020.2.0b2 for this right now

    I'm pretty sure issues is that this class is abstract. Error message says the same.
    Code (CSharp):
    1. [CustomPropertyDrawer(typeof (MixerState.Transition<,>), true)]
    2. public abstract class TransitionDrawer : ManualMixerState.Transition.Drawer
    PS: Getting same issue from SpiderBotAdvanced component.
     

    Attached Files:

  50. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,486
    They probably changed the way they gather property drawers so it's picking the base class even though a more specific drawer exists. Or it could just be a Beta bug.

    If you have Animancer Pro, you should be able to fix it by opening MixerState.cs and removing the CustomPropertyDrawer attribute from the abstract TransitionDrawer class at the bottom. It probably shouldn't be there anyway, but I'll have to look through the class hierarchy in more detail.

    Otherwise let me know and I'll recompile Animancer Lite for you.