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

Project upgrade to Unity 4 lost all Prefabs animation clips reference

Discussion in 'Scripting' started by Kaze_Senshi, Dec 15, 2012.

  1. Kaze_Senshi

    Kaze_Senshi

    Joined:
    Feb 19, 2012
    Posts:
    243
    Hello guys, today I was planning to start to convert my project animations to the new system, for while I was planning to let the Legacy system and so I could change one per one object. But when I opened my 3.5 project with Unity 4.0 it converted my project to the 4.0 and broke it. All prefabs lost the Animation clips so every command like the below one gives me a NullPointer Exception:

    Code (csharp):
    1.     var run = anim["walk"];
    2.     run.speed *= runAnimationSpeedModifier;
    I tried to delete the Animation with the Missing animation clip and drag and drop the fbx object inside my old prefab but the animations does not come together, even the mesh disappear when I do this. I tried to recreate the animations in the import fbx screen or change the animation type from Legacy to Generic but it didn't work too. Can someone help me :/

     
  2. irie

    irie

    Joined:
    Dec 24, 2012
    Posts:
    3
    Hi, i have the same problem. After upgrading project from 3.5 to 4, all prefabs lost there animation settings. I can't select them manually. I also tried the different import settings from the fbx model. This also just happens when the animations are saved in one model file. Need help too...
     
  3. Kaze_Senshi

    Kaze_Senshi

    Joined:
    Feb 19, 2012
    Posts:
    243
    Ah yeah I solved this problem here, try this:

    1- Choose your fbx imported model inside Unity;
    2- Select the "Rig" tab and change the animation type to "Generic", now if you expand your fbx object children you'll see a new avatar object;
    3- Go to Animations tab;
    4- Choose one animation at the clips section, keep the start and end frames on your head;
    4.1- If there are no animations there, you can create it like you are used to do on Unity 3.x;
    5- In the dropdown menu "Source Take" choose the option "Default Take", your animation will lose the start and end frame numbers, fix it;

    Now if you look at the children of your fbx object you can see some animation objects, you can just drag them to the Element X that became "Missing (Animation Clip) and voilá, your problems are solved :p