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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Mecanim - many motion with few motion state problem.

Discussion in 'Editor & General Support' started by nicekei, May 17, 2013.

  1. nicekei

    nicekei

    Joined:
    Dec 20, 2012
    Posts:
    4
    #0. Background -

    Hi, we are currently developing a game which has few hundres of motions, but the character's motion state is simple. eg. idle-attack-hit state.
    What we want to do is changing it's motion based on the skills/level ups. Each characters are humanoid types. Note that we need mecanim's motion retargeting feature..
    Currently Mecanim does not have/expose API's related to changing it's motion used.



    #1. Big memory usages with many motion states with unique motions -

    So for the current version of Unity, we believed that the workaround would be making an animator controller which has a lot of at eg. attack1~attack100 states. But in that case we are worried about the required memory. Is it ok for the animation controller having a lot of motion states which has it's own unique motion? I wonder if some kind of lazy loading and free up techniques would be available in the mecanim, so in my case no actual motion memory would be taken in case I don't actually transit to that motion state, and the currently not used motion would be taken out from the memory.



    #2. Approximately when can we have Unity 4.x with change motion by script feature(in mecanim)? -

    The best way would be changing the motion in the state by script. I heard that more mecanim functions would be exposed in the future unity 4.x releases.(http://docs.unity3d.com/Documentation/Manual/MecanimFAQ.html)
    I understand you guys have many important features to develop, but I'm curious when can we access the mecanim script access features... If that's not too late, we could delay motion related development schedule to the point after it. Or if it take too much time, we need to find a solution to the #1's problem...


    Or are there any better solutions to this problem? Note that we need to use mecanim for it's motion retargetting features..

    Thanks.
     
  2. steampenny

    steampenny

    Joined:
    Apr 23, 2013
    Posts:
    3
    I feel your pain. I would love to know when we will be able to set the motion of a state in code.

    It has been a nightmare trying to work around this limitation. Our characters are super customizable, and it would make the most sense to have a single template Animator Controller and inject the correct motions at runtime. However this is not yet possible to do from scripting on IOS (we managed with reflection, but can't exactly do that on mobile)

    I check the unity updates tab every day to hoping to see if an update has been released that includes this one single function. You guys are not alone!
     
  3. nicekei

    nicekei

    Joined:
    Dec 20, 2012
    Posts:
    4
    Thank you steampenny.

    Unity guys, we are still waiting.. really need to hear from you :)

    Thanks.