Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Bug Animation Rigging and Sequences throws exceptions sometimes when using particular animation clips

Discussion in '2022.2 Beta' started by akent99, Sep 24, 2022.

  1. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    I am using 2022.2.0b8.3023 with Sequences 2.0.0-pre.2 (Cinematic Studio feature set) and Animation Rigging 1.2.0 (3D Characters and Animation feature set). Some sequences with character animations seem to work fine. Some animation clips result in exceptions in the Console and the character is not animated.

    The exceptions come in pairs. First:

    NullReferenceException: Object reference not set to an instance of an object
    UnityEngine.Animations.Rigging.RigUtils.ExtractAllSyncableData (UnityEngine.Animator animator, System.Collections.Generic.IList`1[T] layers, System.Collections.Generic.List`1[UnityEngine.Transform]& syncableTransforms, System.Collections.Generic.List`1[UnityEngine.Animations.Rigging.SyncableProperties]& syncableProperties) (at Library/PackageCache/com.unity.animation.rigging@1.2.0/Runtime/AnimationRig/RigUtils.cs:188)
    UnityEngine.Animations.Rigging.RigUtils.CreateSyncSceneToStreamData (UnityEngine.Animator animator, System.Collections.Generic.IList`1[T] layers) (at Library/PackageCache/com.unity.animation.rigging@1.2.0/Runtime/AnimationRig/RigUtils.cs:328)
    UnityEngine.Animations.Rigging.SyncSceneToStreamLayer.Initialize (UnityEngine.Animator animator, System.Collections.Generic.IList`1[T] layers) (at Library/PackageCache/com.unity.animation.rigging@1.2.0/Runtime/AnimationRig/SyncSceneToStreamLayer.cs:21)
    UnityEngine.Animations.Rigging.RigBuilderUtils.BuildPlayables (UnityEngine.Animator animator, UnityEngine.Playables.PlayableGraph graph, System.Collections.Generic.IList`1[T] layers, UnityEngine.Animations.Rigging.SyncSceneToStreamLayer syncSceneToStreamLayer) (at Library/PackageCache/com.unity.animation.rigging@1.2.0/Runtime/AnimationRig/RigBuilderUtils.cs:58)
    UnityEngine.Animations.Rigging.RigBuilder.BuildPreviewGraph (UnityEngine.Playables.PlayableGraph graph, UnityEngine.Playables.Playable inputPlayable) (at Library/PackageCache/com.unity.animation.rigging@1.2.0/Runtime/AnimationRig/RigBuilder.cs:264)
    UnityEngine.Timeline.AnimationTrack.CreateMixerPlayableGraph (UnityEngine.Playables.PlayableGraph graph, UnityEngine.GameObject go, UnityEngine.Timeline.IntervalTree`1[T] tree) (at Library/PackageCache/com.unity.timeline@1.7.1/Runtime/Animation/AnimationTrack.cs:644)
    UnityEngine.Timeline.TrackAsset.CreatePlayableGraph (UnityEngine.Playables.PlayableGraph graph, UnityEngine.GameObject go, UnityEngine.Timeline.IntervalTree`1[T] tree, UnityEngine.Playables.Playable timelinePlayable) (at Library/PackageCache/com.unity.timeline@1.7.1/Runtime/TrackAsset.cs:781)
    UnityEngine.Timeline.TimelinePlayable.CreateTrackPlayable (UnityEngine.Playables.PlayableGraph graph, UnityEngine.Playables.Playable timelinePlayable, UnityEngine.Timeline.TrackAsset track, UnityEngine.GameObject go, System.Boolean createOutputs) (at Library/PackageCache/com.unity.timeline@1.7.1/Runtime/TimelinePlayable.cs:202)
    UnityEngine.Timeline.TimelinePlayable.CompileTrackList (UnityEngine.Playables.PlayableGraph graph, UnityEngine.Playables.Playable timelinePlayable, System.Collections.Generic.IEnumerable`1[T] tracks, UnityEngine.GameObject go, System.Boolean createOutputs) (at Library/PackageCache/com.unity.timeline@1.7.1/Runtime/TimelinePlayable.cs:135)
    UnityEngine.Timeline.TimelinePlayable.Compile (UnityEngine.Playables.PlayableGraph graph, UnityEngine.Playables.Playable timelinePlayable, System.Collections.Generic.IEnumerable`1[T] tracks, UnityEngine.GameObject go, System.Boolean autoRebalance, System.Boolean createOutputs) (at Library/PackageCache/com.unity.timeline@1.7.1/Runtime/TimelinePlayable.cs:115)
    UnityEngine.Timeline.TimelinePlayable.Create (UnityEngine.Playables.PlayableGraph graph, System.Collections.Generic.IEnumerable`1[T] tracks, UnityEngine.GameObject go, System.Boolean autoRebalance, System.Boolean createOutputs) (at Library/PackageCache/com.unity.timeline@1.7.1/Runtime/TimelinePlayable.cs:86)
    UnityEngine.Timeline.TimelineAsset.CreatePlayable (UnityEngine.Playables.PlayableGraph graph, UnityEngine.GameObject go) (at Library/PackageCache/com.unity.timeline@1.7.1/Runtime/TimelineAsset.cs:409)
    UnityEngine.Playables.PlayableAsset.Internal_CreatePlayable (UnityEngine.Playables.PlayableAsset asset, UnityEngine.Playables.PlayableGraph graph, UnityEngine.GameObject go, System.IntPtr ptr) (at <d8312cdadbc04553bb2b6d38bb19d383>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)


    Then

    PlayableAsset returned a null Playable on Instantiate
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)


    If I disable the Rig Builder component on the character the exceptions stop. If I disable the animation track for the character the exceptions stop. But this problem does not occur for all sequences!

    PS: The title may be wrong. It originally seemed to be because of a particular animation clip I was using, but when I tried to repeat, deleting that clip (an idle clip) made no difference. So probably a red herring.