InvalidOperationException When I press play

Hello,
Every time I press play in the console I keep getting this error:

InvalidOperationException: The TransformStreamHandle cannot be resolved.
UnityEngine.Animations.TransformStreamHandle.CheckIsValidAndResolve (UnityEngine.Animations.AnimationStream& stream) (at <0d2763ad82354fc6a022a2846086ca7b>:0)
UnityEngine.Animations.TransformStreamHandle.GetLocalTRS (UnityEngine.Animations.AnimationStream stream, UnityEngine.Vector3& position, UnityEngine.Quaternion& rotation, UnityEngine.Vector3& scale) (at <0d2763ad82354fc6a022a2846086ca7b>:0)
UnityEngine.Animations.Rigging.ReadWriteTransformHandle.GetLocalTRS (UnityEngine.Animations.AnimationStream stream, UnityEngine.Vector3& position, UnityEngine.Quaternion& rotation, UnityEngine.Vector3& scale) (at Library/PackageCache/com.unity.animation.rigging@0.2.5-preview/Runtime/AnimationJobs/TransformHandle.cs:13)
UnityEngine.Animations.Rigging.AnimationRuntimeUtils.PassThrough (UnityEngine.Animations.AnimationStream stream, UnityEngine.Animations.Rigging.ReadWriteTransformHandle handle) (at Library/PackageCache/com.unity.animation.rigging@0.2.5-preview/Runtime/Utils/AnimationRuntimeUtils.cs:220)
UnityEngine.Animations.Rigging.MultiParentConstraintJob.ProcessAnimation (UnityEngine.Animations.AnimationStream stream) (at Library/PackageCache/com.unity.animation.rigging@0.2.5-preview/Runtime/AnimationJobs/MultiParentConstraintJob.cs:95)
UnityEngine.Animations.ProcessAnimationJobStruct`1[T].Execute (T& data, System.IntPtr animationStreamPtr, System.IntPtr methodIndex, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at <0d2763ad82354fc6a022a2846086ca7b>:0)

Can anyone help me with this issue? maybe this is the reason why my animation rigging isn’t working properly?

Hi,

We’re missing some information in order to help you. What version of Unity are you using? Also, how is your constraint setup? Is this a generic hierarchy or a humanoid hierarchy?

Perhaps you are trying to write in a transform component that is outside of the animated hierarchy?

Also, we fixed some errors in the last few months where some hierarchies could not resolve their nested animated transforms properly. Maybe check with a newer version of 2019.2, 2019.3 or 2020.1.

i had this issue too, didnt know that rig had to be a child of the root

I get the same exception, but for me it’s because my Animator component isn’t on the root gameobject. Guess I’ll have to restructure things if I want to use this package.

The hierarchy for my characters looks like this.

  • Character (Scripts)

  • Vis (Animator)

  • Rig

  • Meshes

  • Skeleton

  • Ragdoll

Hi, this should be fixed in newer version of 2019.2, 2019.3 or in the beta version of 2020.1. What version of Unity are you using?

Good to hear it has been addressed! I’m running Unity 2019.2.11f1 and Animation Rigging 0.2.6. I’ll try installing the latest version of 2019.2.

Still getting the error in 2019.2.21f1. Also getting a new error

Unexpected exception System.IO.FileNotFoundException: Could not load file or assembly ‘Smash, Version=0.3.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies.
File name: ‘Smash, Version=0.3.0.0, Culture=neutral, PublicKeyToken=null’

Does it want a newer version of the Animation Rigging package? The package manager will only let me update to 0.2.6. Despite the issues the package is looking very interesting. Can’t wait to mess with it in the future.

Hi, this issue is not related to the Animation Rigging package per se. This is an issue with how the underlying animation c# jobs system rebuilds a custom avatar if the one provided to the Animator doesn’t map all animated transforms/properties. So upgrading to a new version of Animation Rigging will not fix this.

One workaround to this issue is to generate an Avatar yourself:
5717530--598897--Build generic avatar.png

Otherwise, if you think this is a bug, please submit a bug report through the Unity bug reporter. This is the best way for us the reliably track these issues.

2 Likes

Using a generic avatar fixed the original error message for me, thanks!

I get these two errors now when I hit play, but at least it’s not a constant stream of errors. :slight_smile:

Error 1:
Unexpected exception System.IO.FileNotFoundException: Could not load file or assembly ‘Smash, Version=0.3.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies.
File name: ‘Smash, Version=0.3.0.0, Culture=neutral, PublicKeyToken=null’
at Burst.Compiler.IL.Jit.JitCompiler+CachedMethodKey…ctor (System.String methodFullName, Burst.Compiler.IL.Jit.JitOptions options) [0x00007] in <2c9ff9fb581642acaeb86844246ad423>:0
at Burst.Compiler.IL.Jit.JitCompiler.CompileMethod (Mono.Cecil.MethodReference methodReference, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x0001f] in <2c9ff9fb581642acaeb86844246ad423>:0
at Burst.Compiler.IL.Jit.JitCompilerService.Compile (Burst.Compiler.IL.Jit.JitCompilerService+CompileJob job) [0x002ce] in <2c9ff9fb581642acaeb86844246ad423>:0

While compiling job: System.Void UnityEngine.Experimental.Animations.ProcessAnimationJobStruct`1<UnityEngine.Animations.Rigging.TwoBoneIKConstraintJob>::Execute(T&,System.IntPtr,System.IntPtr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,System.Int32)

Error 2:
Unexpected exception System.IO.FileNotFoundException: Could not load file or assembly ‘Smash, Version=0.3.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies.
File name: ‘Smash, Version=0.3.0.0, Culture=neutral, PublicKeyToken=null’
at Burst.Compiler.IL.Jit.JitCompiler+CachedMethodKey…ctor (System.String methodFullName, Burst.Compiler.IL.Jit.JitOptions options) [0x00007] in <2c9ff9fb581642acaeb86844246ad423>:0
at Burst.Compiler.IL.Jit.JitCompiler.CompileMethod (Mono.Cecil.MethodReference methodReference, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x0001f] in <2c9ff9fb581642acaeb86844246ad423>:0
at Burst.Compiler.IL.Jit.JitCompilerService.Compile (Burst.Compiler.IL.Jit.JitCompilerService+CompileJob job) [0x002ce] in <2c9ff9fb581642acaeb86844246ad423>:0

While compiling job: System.Void UnityEngine.Experimental.Animations.ProcessAnimationJobStruct`1<UnityEngine.Animations.Rigging.RigSyncSceneToStreamJob>::Execute(T&,System.IntPtr,System.IntPtr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,System.Int32)

This error doesn’t look like it’s directly related to Animation Rigging. This is an error with the burst compiler. From what I could gather, it looks like it’s triggered when updating projects…

Here’s what I found about it:

Restarting Unity fixed the issue, thanks!

This solution worked for me thanks, hope this issue is foxed soon!