Search Unity

Feedback Moving UnityEditor.Animations to UnityEngine Namespace

Discussion in 'Animation' started by DreamersINC, Feb 11, 2021.

  1. DreamersINC

    DreamersINC

    Joined:
    Mar 4, 2015
    Posts:
    131
    I am currenting working a stylized hack and slack game where the player is able to unlock more combo as the game progresses. I have working at this for the last 4 evening and unless I am missing something I am going to have write class to manual transition between animation states because I can not unmute a transition at runtime. Which now makes me question what the purpose of mute is. Animator is a great asset but all the functionality is in editor script. Am I missing something here ? Right now the legacy animator is out pace the animator and playables is just bad.
     
  2. M-Elwy

    M-Elwy

    Joined:
    Jan 28, 2021
    Posts:
    38
    Hello,
    Why don't you leave all the transitions unmuted and use animator parameter instead? For example, create parameter named "ComboLevel", for higher level combos add condition to transition "ComboLevel" greated than X.
    If combos are unlocked individually you can use boolean parameter for each combo.
     
  3. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    I assume mute is just for testing purposes and anything muted gets compiled out of runtime builds (though with how badly the system is designed it wouldn't surprise me if they left all the useless data in).

    You should check out Animancer (link in my signature) which lets you avoid Animator Controllers and control everything at runtime with your scripts instead. The Weapons and 3D Game Kit examples demonstrate how easily you can implement a combo system.
     
  4. DreamersINC

    DreamersINC

    Joined:
    Mar 4, 2015
    Posts:
    131
    Thanks for the link. The issues is having to manually code and manage code all the animation states. Each animation in the combo chain has to be setup as show below. Similar to what you are doing in Animancer. Its kind of annoying when you have to setup 100+ combo states. You code is nice but it is just another work around for something that could be fixed by allow the muting/unmuting or runtime creation of transitions.

    upload_2021-2-12_23-12-59.png