Search Unity

Import Skeleton Hierarchy Naming Issue

Discussion in 'Editor & General Support' started by thellama, Dec 5, 2010.

  1. thellama

    thellama

    Joined:
    Mar 25, 2010
    Posts:
    360
    When I import my character I get the following Hierarchy:
    Code (csharp):
    1. Sophie
    2. -Root (GameObject)
    3. -SophieMesh (GameObject)
    4. -SophieMesh(Mesh)
    This is fine. Everything is as it should be.

    Then I create some animations for my character and I import ONLY the skeleton. This is what I get: (Note because of how it rearranges my Hierarchy it breaks the ability to apply the animation)
    Code (csharp):
    1. Sophie@Walk
    2. -Spine1(GameObject)
    3. -Pelvis(GameObject)
    4. -Walk(Animation Clip)
    It renames my ROOT to Sophie@Walk

    WHY!?

    The only way I know to fix this is to add a null "group" or "locator" into the maya scene and export it, along with the Skeleton. When I do this I get:
    Code (csharp):
    1. Sophie@Walk
    2. -Root(GameObject)
    3. -Locator(GameObject)
    4. -Walk(Animation Clip)
    This animation then works properly because the Root of this file now matched it with the Root of the Sophie file as seen above.

    It's not a HUGE problem but it seems quite retarded that I should need to add a locator to each animation I export. Can anyone explain why this happens or if this is just a strange bug or what?

    In short this is stupid. If i have an object named "Awesome Barrel" and I export it with the file name "Prop001" Unity will rename my "Awesome Barrel" to "Prop001"

    Second, this makes no sense for the @animation system. Why rename the root of the skeleton with the file name so it no longer matches up with the root and mesh in the master file?!

    Ugh, it hurts my brain.
     
    Last edited: Dec 5, 2010
  2. thellama

    thellama

    Joined:
    Mar 25, 2010
    Posts:
    360
    No one can explain this issue, at least give a reason why?
     
  3. Paulius-Liekis

    Paulius-Liekis

    Joined:
    Aug 31, 2009
    Posts:
    672
    Hi,

    I have answered this before, but even I wouldn't be able to find my own answer :)

    This is by design.

    Short answer:
    Just add "group"/"locator"/"dummy mesh" in order to force Unity to generate correct hierarchy.

    Long answer:
    Problem is: if there is multiple roots in the file, then Unity need to add extra root. if there is a sinle root - Unity can use it as a root.

    Imagine these hierarchies:

    1)
    CubeMesh

    2)
    CharacterMesh
    Hips
    --Spine
    --AndSoOn

    3)
    Hips
    --Spine
    --AndSoOn

    In a case #2 Unity is forced to add extra root (because there is no way to import multiple roots otherwise). Extra root won't be added in case #3. Sure we can always add an extra root in order to fix compatibility between file #2 and #3, but then it raises a new problem: I don't want any extra roots on a single mesh file (and similar), i.e. case #1.

    I hope this explains the design issue.
     
  4. thellama

    thellama

    Joined:
    Mar 25, 2010
    Posts:
    360
    I guess that makes since. I mean it's not a huge deal it's just an minor inconvenience.

    Thanks for clearing that up.