Search Unity

Split animations not working properly?

Discussion in 'Scripting' started by NeilM0, Aug 31, 2009.

  1. NeilM0

    NeilM0

    Joined:
    Mar 31, 2009
    Posts:
    135
    Has anyone else run into a situation where split animations isn't working properly when modified through a script?

    I have a FBX from max that I'm loading. My preprocessor/postprocessor function is setting the Split Animations checkbox and it is assigning a bunch of animations to the FBX (Entering in the frame numbers itself).

    If I do this manually I see the list of animations at the top of the fbx in an Animation component greyed out, and all of the animations listed in a listbox below.

    When my post processor script does exactly the same thing, split animations is checked. The list is also at the bottom with all of the animations and their frame numbers are listed correctly, but the Animation component doesn't list any of the animations which should be there.

    Is this an order of operations issue or is this a bug in unity? Reloading the project fixes the issue.

    Is there any way I can force the Inspector view to update?
     
  2. AngryAnt

    AngryAnt

    Keyboard Operator

    Joined:
    Oct 25, 2005
    Posts:
    3,045
    If you'd post your script, we could take a closer look at what's going on :) Would make it easier to determine exactly what "does exactly the same thing" means ;)
     
  3. NeilM0

    NeilM0

    Joined:
    Mar 31, 2009
    Posts:
    135
    Yeah I was afraid of that. It's a pretty big script now. I'll see if I can't cut it down to the basics.