Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Bug Animation Rigging Weapon Attachment

Discussion in 'Animation Previews' started by wagenheimer, Jun 25, 2020.

  1. wagenheimer


    Jun 1, 2018
    I could not understand why I cannot add a Weapon to my Character!

    When I add a new model (A Basebal Bat) on the hand of my model, all animations stops working with the error :

    Code (csharp):
    2. Transform 'BaseballBatAttachment' not found in HumanDescription.
    3. InvalidOperationException: The TransformStreamHandle cannot be resolved.
    4. UnityEngine.Animations.TransformStreamHandle.CheckIsValidAndResolve (UnityEngine.Animations.AnimationStream& stream) (at <a5ca0264dc584b65a7e26b617cf0c585>:0)
    5. UnityEngine.Animations.TransformStreamHandle.SetLocalTRS (UnityEngine.Animations.AnimationStream stream, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation, UnityEngine.Vector3 scale, System.Boolean useMask) (at <a5ca0264dc584b65a7e26b617cf0c585>:0)
    6. UnityEngine.Animations.Rigging.RigSyncSceneToStreamJob+TransformSyncer.Sync (UnityEngine.Animations.AnimationStream& stream) (at Library/PackageCache/com.unity.animation.rigging@0.3.3-preview/Runtime/AnimationJobs/RigSyncSceneToStreamJob.cs:49)
    7. UnityEngine.Animations.Rigging.RigSyncSceneToStreamJob.ProcessAnimation (UnityEngine.Animations.AnimationStream stream) (at Library/PackageCache/com.unity.animation.rigging@0.3.3-preview/Runtime/AnimationJobs/RigSyncSceneToStreamJob.cs:117)
    8. UnityEngine.Animations.ProcessAnimationJobStruct`1[T].Execute (T& data, System.IntPtr animationStreamPtr, System.IntPtr methodIndex, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at <a5ca0264dc584b65a7e26b617cf0c585>:0)
    I'm using Animation Rigging only to make my character look at the direction of the enemies.
  2. nocanwin


    May 7, 2009
    I'm getting the same bug. I'm parenting an object to my characters hand at runtime. Everything works fine in the editor, but the build crashes.
  3. simonbz


    Unity Technologies

    Sep 28, 2015

    Getting `InvalidOperationException: The TransformStreamHandle cannot be resolved.` means that the transform has not been added to the bindings in the Animator.

    To be as efficient as possible, all Transforms in Animation Rigging are animatable bindings in the Animator. This allows constraints to evaluate in the animation stream and read back directly from the animation output in threads. However, this also implies that changing the hierarchy at runtime will not update the animatable bindings directly.

    To do that, you'd need to do the following.

    Disable the animator.
    Rebuild the Animation Rigging Playable Graph by calling `RigBuilder.Build()`.
    Reenable the animator.

    However, rebuilding the PlayableGraph and rebinding the Animator is costly, so I would advise against doing it too often.