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. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Question How can I have abilities with thier own animations?

Discussion in 'Animation' started by MadboyJames, Dec 1, 2022.

  1. MadboyJames

    MadboyJames

    Joined:
    Oct 28, 2017
    Posts:
    251
    I have many abilities, or more specifically I will have many abilities and I'm not all sure what they will be.

    I know I can set an animation parameter through script, but I would like to go a step further.

    I would like to give an ability an animation, and give a player a bunch of abilities. When the player activates an ability, the ability will tell the player's animator to play the animation assigned to the ability.

    The trick I'm trying to pull off is the player's animator does not have a state with the ability's animation before activation.

    Is decoupling like this possible without writing my own animation system? If so, how?
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,335
    Animator Override Controllers can help with that, though it's still a fairly clunky system. You need to set up all the states you might need with dummy clips so that you can then override those clips by name (clip name, not state name).

    I can't tell you about my real recommendation though because advertising isn't allowed here (except in signatures).
     
    halley likes this.
  3. MadboyJames

    MadboyJames

    Joined:
    Oct 28, 2017
    Posts:
    251
    That is somewhat the answer I expected. I'll probably get animancer at some point, but atm I still have plenty of assets to figure out how to integrate with eachother. I guess I'll do it the clunky way for now.