Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Bug Animation rigging error: The TransformStreamHandle cannot be resolved

Discussion in 'Animation' started by masta-yoda, Nov 3, 2020.

  1. masta-yoda

    masta-yoda

    Joined:
    Apr 19, 2020
    Posts:
    91
    Animation rigging generates errors on my character's multi-parent constraint. And the constraint itself doesn't work (if I move the source, the constrained object stays in place and continuously controlled by animation):

    shot_201102_175906.png

    shot_201102_180425.png


    Code (CSharp):
    1.  
    2. InvalidOperationException: The TransformStreamHandle cannot be resolved.
    3. UnityEngine.Animations.TransformStreamHandle.CheckIsValidAndResolve (UnityEngine.Animations.AnimationStream& stream) (at <dd504953d81e4c1f9a1b8f7bbfb7fda8>:0)
    4. UnityEngine.Animations.TransformStreamHandle.SetLocalTRS (UnityEngine.Animations.AnimationStream stream, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation, UnityEngine.Vector3 scale, System.Boolean useMask) (at <dd504953d81e4c1f9a1b8f7bbfb7fda8>:0)
    5. UnityEngine.Animations.Rigging.RigSyncSceneToStreamJob+TransformSyncer.Sync (UnityEngine.Animations.AnimationStream& stream) (at Library/PackageCache/com.unity.animation.rigging@0.3.4-preview/Runtime/AnimationJobs/RigSyncSceneToStreamJob.cs:49)
    6. UnityEngine.Animations.Rigging.RigSyncSceneToStreamJob.ProcessAnimation (UnityEngine.Animations.AnimationStream stream) (at Library/PackageCache/com.unity.animation.rigging@0.3.4-preview/Runtime/AnimationJobs/RigSyncSceneToStreamJob.cs:117)
    7. UnityEngine.Animations.ProcessAnimationJobStruct`1[T].Execute (T& data, System.IntPtr animationStreamPtr, System.IntPtr methodIndex, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at <dd504953d81e4c1f9a1b8f7bbfb7fda8>:0)
    8.  

    As soon as I remove the multi-parent constraint - the error is gone.
    What can be wrong with my animation rigging?
     
    Last edited: Nov 3, 2020
  2. masta-yoda

    masta-yoda

    Joined:
    Apr 19, 2020
    Posts:
    91
    Turned out that my hierarchy was incorrect. I have to move VRConstraints to the same level as the root.
     
    PixelFireXY, oAzuehT, AB498 and 3 others like this.
  3. Krooq

    Krooq

    Joined:
    Jan 30, 2013
    Posts:
    196
    Thanks for solving and sharing this, drove me nuts!
     
    masta-yoda likes this.
  4. AshyB

    AshyB

    Joined:
    Aug 9, 2012
    Posts:
    191
    This was absolutely driving me insane. I had the same issue. In the end it was because my skeletal rig had incorrect child setups.

    For example, I have a humanoid character. On the skeletal rig I made some empty game objects and gave them colliders so that I could create things like physical body parts etc.

    I normally parent one object per bone kind of setup;

    hand
    -collider
    -finger1
    --collider
    --finger2
    ---collider
    ---finger3
    ----collider
    etc.

    The error message was caused by the following;

    hand
    -collider
    --collider1
    --collider2

    -finger1
    --collider
    --finger2
    ---collider
    ---finger3
    ----collider
    etc.

    Apparently, it did not like parenting child colliders multiple times under the hand, I think it liked having bone->object->bone->object

    not bone->object->object

    Once I move collider1 and collider2 up a level so they were all equal children of the hand the problems went away;

    hand
    -collider
    -collider1
    -collider2

    -finger1
    --collider
    --finger2
    ---collider
    ---finger3
    ----collider
    etc.

    For some reason, its like rig builder takes a snapshot of your skeleton and then anything you add after kind of confuses it :p

    p.s. tried the following before hand;
    1. Build generic avatar.
    2. configuring avatar.
    3. Completely destroying, reimporting the mesh and redoing the whole character.
    4. Creating a new project, importing the character, and then copy and pasting the character from the new project to the old one to overwrite.
    5. Upgrading unity version.
    6. Removing and re-add packages.
    Nothing worked except the child setup above, even though the rig constraints I have do not reference any of the collider objects.
     
  5. samagan888

    samagan888

    Joined:
    Oct 28, 2020
    Posts:
    2
    hey can u show the current hierarchy?
     
  6. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    450
    happening to me as well. really annoying
     
  7. Freakish

    Freakish

    Joined:
    Jun 3, 2015
    Posts:
    84
    Thankyou for your post. It saved me from more tedious hours of trying to work out what was wrong.

    I must say I'm rather disappointed to see this thread created almost 8months ago, and not a single peep from Unity, no mention if this issue will be addressed, and still causing much headaches all this time on. (Despite it being marked with a big red 'BUG' sign in the thread.

    I hoped it was just an issue with the Alpha I was using or a known issue that would be addressed. Instead I cannot seem to use the Animation system as intended to actually animate anything. I simply cannot use an item that is parented to hands, or face etc, because I keep getting this exception.

    I can as you suggest unparent the object that is causing the issue, but that isn't an accetable outcome, as I'm trying to animate interaction between the hand and the parented object.

    I remain perplexed why this isn't being addressed.
     
  8. grofie

    grofie

    Joined:
    Dec 9, 2013
    Posts:
    30
    Wasted a day on that too. For us, the issue was a bit different than described above:

    We also have a humanoid setup with a rig builder and constraints. We got the error with only one unit, a dozen others work well. Turns out, not the unit but the attached weapon (which gets added at runtime!) was the problem.
    It had this hierarchy:

    - Mesh_Wep_P_RIFLE_Tokko_3LOD
    -- LeftHandGrip.012
    -- Mesh_Wep_P_RIFLE_Tokko_3LOD
    -- Mesh_Wep_P_RIFLE_TokkoMagazine_3LOD
    -- RaycasterBullets.012
    -- SleevesRoot.012

    The problem was the double naming, even though they were not in the same hierarchy! Changing line 3 to something else, fixed it.

    I guess you have to make 100% sure that there are no duplicate names in your bone hierarchy at all, even when they are not referenced in any rig or rig builder! Even when you add new objects at runtime!
     
  9. chemicalcrux

    chemicalcrux

    Joined:
    Mar 16, 2017
    Posts:
    726
    Thanks, that fixed a problem I was having. I had an even simpler setup:

    - GameObject (ChainIK Constraint)
    -- GameObject (the source for the Chain)

    This made all of my constraints emit big piles of errors.
     
    SharadDevOfficial likes this.
  10. Namysoft

    Namysoft

    Joined:
    Sep 8, 2018
    Posts:
    10
    I also have the same issue...
    Error: The TransformStreamHandle cannot be resolved.


    No additional collider, no duplicated names...

    Unbenannt.JPG
     
  11. Decep

    Decep

    Joined:
    Jul 29, 2021
    Posts:
    1
    I also have the same issue...
    Error: The TransformStreamHandle cannot be resolved.
    No additional collider, no duplicated names.
    All components of my humanoid character are set according to the sample.
    My unity version is 2020.3.15f1
     

    Attached Files:

    • 1.png
      1.png
      File size:
      10.9 KB
      Views:
      623
    • 2.png
      2.png
      File size:
      566.5 KB
      Views:
      618
    • 3.png
      3.png
      File size:
      5.3 KB
      Views:
      634
    • 4.png
      4.png
      File size:
      110.3 KB
      Views:
      633
    • 5.png
      5.png
      File size:
      34.3 KB
      Views:
      587
  12. SirKnightDragoon

    SirKnightDragoon

    Joined:
    Mar 22, 2016
    Posts:
    23
    I just added the package, and I'm trying a really basic test, and I'm getting the same error... :(
     
    AltnativeB likes this.
  13. SirKnightDragoon

    SirKnightDragoon

    Joined:
    Mar 22, 2016
    Posts:
    23
  14. marcosbiagi

    marcosbiagi

    Joined:
    Mar 22, 2019
    Posts:
    6
  15. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    450
    Take a look here: https://issuetracker.unity3d.com/is...eshes-are-not-direct-children-of-the-animator. I've stumbled upon such an issue myself and prepared a repro & submitted a bug report. Feel free to vote.
     
    anycolourulike likes this.
  16. tlodhi

    tlodhi

    Joined:
    Oct 29, 2021
    Posts:
    1
    Simple Solution
    Just put your rig system object under your character skeleton
     
    pachermann likes this.
  17. alti

    alti

    Joined:
    Jan 8, 2014
    Posts:
    94
    for me this happened because I had an armature character (without AR on it) as a (deep) child of the character that had the animation rigging component. Apparently that's not allowed. And of course the unity error did not cite that as the reason, because that would be too helpful.
     
  18. awesome-sauce

    awesome-sauce

    Joined:
    Jun 17, 2015
    Posts:
    1
    This solution did not work for me
    My error is - System.InvalidOperationException: The TransformStreamHandle is invalid. Please use proper function to create the handle.
     
  19. Welly10

    Welly10

    Joined:
    Aug 13, 2021
    Posts:
    40
    I'm facing the issue and I didn't get what is the cause of the error as I didn't do anything I just created the multi-Aim constrained and then added a source object then the error pops up
    any help will be highly appreciated
     
  20. Freakish

    Freakish

    Joined:
    Jun 3, 2015
    Posts:
    84
    It often comes from adding an object to my characters. So I I were to add a weapon, or clothing element it will stop the rig stuff from working and throw the error. It often matters where and how you parent such an item.

    I also note it's often not the object itself, but a transform that isn't necessary. For example if I have a weapon with a hierarchy of say Gun-Pistol, with the Gun being a simple empty transform acting as a parent, the error can be removed often from simply removing the Gun portion of the object, and directly attaching the pistol to the characters hand instead.

    I've fixed the issue for me most times by simply changing the hierarchy of the object that is attached to the humanoid. Oddly even if that Pistol object has subobjects, it still works.

    It's just difficult if you have added a lot of objects like clothes, and accessories, because the error is so unspecific.

    So have a look at any objects that may be parented to the bone hierarchy.
     
    Lorrak and Welly10 like this.
  21. Welly10

    Welly10

    Joined:
    Aug 13, 2021
    Posts:
    40
    Thanks for your reply, I've noticed that when I remove the game object the error disappear ..

    I've make a new project and make the animation rigging and all of the stuff, everything was working correctly and I complete all the animation rigging.
    I've closed the project and re open it again in the next day, the error comes back and I don't know why ??
     
    Lorrak likes this.
  22. Lorrak

    Lorrak

    Joined:
    Sep 17, 2019
    Posts:
    53
    Run into the same problem, trying to add a gun to character
    gun hierarchy was Empty Game Object(only transform) -> Gun Object (mesh,meshrendr etc..)
    made it only Gun object, with no parent, well it worked, but later I tried to place it in other empty parent, and it was working without errors..
    it could be cuz gun object was as prefab with empty parent..
    edit:
    if prefabs' root is just empty object and child is the actual object it will cause this error
     
    Last edited: Aug 16, 2022
    virgo73 likes this.
  23. lordubbe

    lordubbe

    Joined:
    Feb 7, 2015
    Posts:
    6
    Just here to add what caused the error for me, which was that a multi aim target source was reparented.
    I really wish the errors would be less cryptic!
     
  24. vegiwoo79

    vegiwoo79

    Joined:
    Feb 4, 2022
    Posts:
    1
    In my case, with Mechanim animation set up and using IK Pass on the animation layer, I was getting same error. Solved it by slightly lowering the
    Weight
    value on the Multi-Aim Constraint component
     
  25. Pur_Cell

    Pur_Cell

    Joined:
    Mar 25, 2013
    Posts:
    9
    Solution that worked for me: The animator had to be on the root transform of the model (where unity automatically adds it when you import a new model into a scene). Then the rig as a child of the animator transform.

    My setup looks like this:
    Unit rigging.png

    I had moved my animator to the parent object before I started using the rigging package. Which was working, until I made some changes to the bones in my model in blender. That's what caused it to break.
     
  26. Deleted User

    Deleted User

    Guest

    If anyone has same hierarchy as me like animator in parent but then all things in another child. just move everything outside of that child. Not only rig object but skeleton too. Because even if I put rig object to correct place I could not move target. It was moving when I create parent of target and move parent. Instead I moved everything outside of child, it solved.
     

    Attached Files:

    • rig.gif
      rig.gif
      File size:
      2 MB
      Views:
      191
  27. alti

    alti

    Joined:
    Jan 8, 2014
    Posts:
    94
    randomly ran into this error when adding a child too deep in a hierarchy. If you get it think back to what the deepest child is you added to the hierarchy, and find a way to move it up a level.
     
  28. Acce010

    Acce010

    Joined:
    Aug 23, 2017
    Posts:
    6
  29. amokto

    amokto

    Joined:
    Apr 5, 2022
    Posts:
    3
  30. pachermann

    pachermann

    Joined:
    Dec 18, 2013
    Posts:
    135
    Im fighting with this problem all day, sometimes it just breaks randomly.
    and just now i randomly tried to use the *Restore Bind pose* in the rigging menu and then ctrl-z then it worked again :Do_O
     
  31. SamohtVII

    SamohtVII

    Joined:
    Jun 30, 2014
    Posts:
    380
    Found my issue, my Prefab was "Rifle 1 > Rifle 1 > ...." It hated 2 gameobjects with the same name. Renamed one to just Rifle and it works.
     
    suIly likes this.
  32. pockysso

    pockysso

    Joined:
    Apr 20, 2023
    Posts:
    1
    100% Package version issue. I work very well 2021.3 but 2022.3 Not work. F***..
     
    Lorrak and pachermann like this.
  33. virgo73

    virgo73

    Joined:
    Dec 4, 2019
    Posts:
    4
    Awesome. You Saved me.... Thanks Dude.........
     
  34. AshyB

    AshyB

    Joined:
    Aug 9, 2012
    Posts:
    191
    Just coming back to this now after a few years with 2022.3.17f1 LTS and having issues again.

    This time the error kept reporting;

    Transform 'CATRigHub003' for human bone 'Head' not found
    InvalidOperationException: The TransformStreamHandle cannot be resolved


    I tried my previous trick, a whole bunch of other things and every other suggestion on here and some other threads. None worked.

    So I had a few wines and thought about it, it kept mentioning "CATRigHub003" and the head bone. The entire character was not a prefab (unpacked completely). The head bone on the character in the scene was called "Head".

    I went and had a look at the original mesh that was imported and the "Head" bone was originally called "CATRigHub003". I renamed the head bone on my unpacked scene character to match and the problem is gone.

    :rolleyes:
     
  35. suIly

    suIly

    Joined:
    Jun 21, 2017
    Posts:
    21
    Renaming the objects so they don't have the same name worked for me! Make sure you don't have any gameobjects as children under the Animator component that have the same name.
     
  36. adem_rodriguez

    adem_rodriguez

    Joined:
    Dec 4, 2019
    Posts:
    1
    this happens when you name the rig's children the same as one of the bones