Models suddenly stuck in poses In-Editor and Animations messed up across project

This has been torturing my team for the past month and a half and we’re all very lost.

My team and I are using Unity 2020.3.27f1 LTS. We had setup many characters across the game. Of course, when we designed them and place them in the world in the Unity Editor, they are in their default T-Pose and animating once the game plays. This has been how the project’s been for the past year.

Then about a month and a half ago I did a bunch of edits related to character animation and performances in a scene and pushed it. From there, all characters across the project broke in some way. I have no idea why as I only edited a few animations for select characters and their triggers. I didn’t touch any code.

When I say they all broke, it’s in various ways. Some characters stopped working entirely or partially; an example being a character with a long coat but now the coat itself no longer animated at all with the rest of the body. Some had parts of their rig that started to bend, distort, and move oddly in ways they never did before on animation, most prominently their hands in most cases. Some contorted into random positions for no reason…

However, the biggest problem is that almost every character model now holds a pose in the Unity editor. We have no idea why. It’s like Unity saved their last posed position and has made it their default pose forever. They hold that pose no matter what. You can remove all their animation components and it will still hold that pose instead of a T-Pose. It could be a sitting position. It could be an idle pose. Sometimes it’s in a cringing position that models go into when their rigs are broken… But almost all of them will animate properly on Play Mode… With some animation errors as mentioned above. And this is on EVERY character. You can see some examples in the images below.

We’ve been scrambling to figure out why such a problem has occurred and it has been a huge setback. There’s no logical reason why such a project-wide problem just suddenly happened. I went back into the commit history to find where it started and it began with my commit… But I did nothing that should have caused something like this. I was tweaking animation performances in one scene which doesn’t even feature most of the characters or anything related to them. Now it suddenly damns the whole project and every character has been affected even if I hadn’t touched them in a long time.

The weird thing is that the animation errors at least have an odd fix mostly. For some, but not all of the characters, if I delete their rig in the prefab and then put a rig back in the prefab fresh from the project files, their animation issues are mostly solved… But there’s nothing actually different about the rig at all. It makes zero sense. This does not fix the posing issue though.

So far, I have no clue what is happening or why. Even putting in the fresh rig does not save the character from becoming affected by the posing issue eventually. The only clue I’ve been able to find is that in Prefab Mode, it T-Poses as it should, but if I click the Show Overrides checkbox it goes back into that pose. This leads me to believe that there is an Override issue, but I couldn’t have triggered anything like that project-wide, I never even knew Overrides like this were a thing until I looked into this clue.

This leads me to believe this is an editor problem because nothing me or any of my team could have done should have caused all this mess to happen. Now we have to redo weeks of work to try and fix some of these issues and we still don’t know how to fully stop these problem or why it’s happening. At least one of these characters are still even more distorted than the images below on animation and we don’t know why. It has forced a crash when I was looking more deeply into the animations at one point. The project/unity seems much more unstable since this began. One of my teammates sent a version to Unity via the Report a Bug function, but whenever I tried doing so myself as well, it never worked. We have yet to hear anything.

Anyone have any idea what is going on?!

Notes

This is Prefab Mode, so it T-Poses as usual. This is how it looks as I edit the prefab directly.

Now back in Regular Editor Mode, it’s holding its idle pose. Note that I am NOT IN PLAY MODE. This happens for just about every model in the game now all of a sudden. This will stick even if you remove its animation and other components. There’s nothing I can do to change this. While it usually will animate mostly fine in Play Mode, there are several minor and major animation errors that seem to be tied to this on pretty much every character (eg. Hands not moving properly or model becoming distorted jelly on animation)

These models are background NPCs. They are ALL messed up by this issue. They either hold a pose or are in a cringe position… Or mess up entirely. This will occur regardless of if you remove all its extra components or not.

This is the first thing I would look at - go through your changes, diff each one, and see what’s changed. Could be some poses got “stuck”, you made a completely different change in the scene, and accidentally checked those in.
Could be a pain to look through scene changes, but it sounds like in this instance you might have to?

From what you’re describing here it almost definitely sounds like an Overrides issue. Could you easily revert all overrides, or do you have ones you actually need?

Could you go into the Prefab, select Show Overrides (let it go into the broken state) - then do Revert?

Another option is to use the inspectors Debug mode to try and look for any hidden broken things. Maybe it’s the bones array of the Skinned Mesh Renderer?

Did that already and cannot find what the issue is. Most of the changes were related to scenes, dialogue databases, and one character’s animation clip by a frame or two. Nothing sticks out. I certainly didn’t hit anything that seemed related to an override. Even if I did, I don’t see why it would affect every single character, including the ones I made no changes to. This happens to even new models I bring into a scene so something is actively changing things.

So I tried this idea and it semi worked. Reverting it does force it back into T-Pose. However, it seems something is actively overwriting things immediately as an entire list of overrides now appears back when I check the override section of the prefab. It seems something is messing with the transforms of basically every joint and if I revert them the overrides are still there even if it goes to T-Pose. I dunno if that permanently fixes the T-Pose problem (time will tell on that front) but it does not fix the animation issues.

Never tried Debug Mode so I’m not sure what I’m looking for here. Nothing seems broken. For reference this what it says on the skinned mesh renderer on the main body of one of my characters.

This is the skinned mesh renderer on Debug Mode after I just applied your revert fix. No idea if anything seems out of the ordinary as I never used Debug mode before. Chances are, this might eventually fall victim to the issue randomly later and start posing again but we’ll see…
8429549--1116023--Screen Shot 2022-09-10 at 4.13.11 AM.jpg

I already did your revert idea and already it’s showing basically every transform of very joint needs some sort of override. Sometimes the numbers are the same, but often you’ll find a few transforms that have some differences. I could revert it but it’s gonna be back to the same override issue immediately after. BTW When this glitch occurred, I hadn’t touched this or the character in my original post for weeks.
8429549--1116026--Screen Shot 2022-09-10 at 4.15.09 AM.jpg

Okay this is “good” - at least now we knows something is definitely overriding all the bones in your rig automatically! Now to find out what :slight_smile: A few questions that might help:

  • Do you have any third party plugins in your project that have to do with rigging/animations?
  • In your screenshots I see the bones and some gizmos on all the characters - where are those coming from? Could that be a plugin/package/script that changes the bones?
  • Do you have any “OnValidate” functions in scripts that might be related to these characters?
  • Do you have any Editor scripts that constantly run?
  • Not likely, but do you maybe have some docked Editor windows somewhere, or even hidden, that can cause this? I say not likely cause you mentioned this is happening for your whole team.

1 & 2. So we are using an “Animation Rigging” plugin from Unity. This is something one of my team members implemented so we can add minor variations to models easily. For example easily posing the background models in various ways without needing to make custom animations, controlling where a character’s head is turned, and altering any animations that may be misaligned (eg. hands intersecting with a table on a sitting animation). Each character has a custom scripted rigging system with this for easy posing, which is why you can see all the bones and gizmos.

At first, I did think this was the culprit of this issue. However, I’ve since doubted that this is likely. This issue is happening on models even when this system is not implimented. For the animation ‘fix’ I had found in my original post, that involves deleting EVERYTHING in the prefab, including the custom Animation Rig system on the character and replacing it with the raw, unmodified rigged model that I animate in Maya. Even with this reset rig without the unity rig system and gizmos, it can still fall victim to the posing problem. The picture of the Blonde character in my original post actually had that removed from her already when I took that picture and still had the issue. Additionally, there are a few models (not seen here) that don’t have that rig system at all because they’re only meant to strike very specific animations from the original file. Even they were having animation issues, like the jacket not moving that I mentioned earlier, until I did the raw rig replacement. Not ruling it out, but this being the cause of the issue is increasingly unlikely. It was working just fine prior to this.

  1. I’ll check this later as I’m not sure. I am the director of the project, but, outside of Directing, I primarily focus on Art, Design, and UX things. While I instruct the types of programming I want done and have a decent understanding of code, I rarely touch the code because I’m terrible at that and leave it to my programmers to deal with. A basic search for OnValidate doesn’t seem to point to anything obvious, beyond codes that come with Unity or the system plugins we’ve been using all this time, but I’ll ask them to check their scripts later.

  2. I don’t believe so from my understanding of how all the systems work. I’ll ask them to check this as well just in case.

  3. No, I don’t believe so. I keep my workspace pretty organized so I’m fairly sure I don’t have any hidden windows running around.

Thanks for the help, but’s late, so I’ll likely respond to anything else tomorrow and get my programmers to look over this thread.

I’m not sure how easy it is, but would it be possible to try and remove the “Animation Rigging” plugin, only as a test?
I understand that the issue happens on models not using it, however since it is a plugin you never know - it could be hooking into an internal Unity editor call or window and doing things regardless of whether they use it or not. But since that’s a Unity package, I’m not sure how easy it would be just taking it out.

It sounds like a piece of code that “automatically validates” all your skinned mesh renderers - by iterating over all of them and maybe trying to set them to a T-Pose (or another default one). This is also more technical, but you could maybe try searching the entire project for things like: FindObjectsOfType or even just SkinnedMeshRenderer. (that would probably make you have to wade through a lot of code, but could maybe uncover potential leads?)

Hey Evyatron, thanks for your help on this. I am the tech artist on this project and thought I’d chime in to help.

I can definitely remove the Animation Rigging package without too much trouble. But the main problem with troubleshooting this is that its not happening consistently. So I could remove the package and it may work for another week or two but then happen again anyway?

Me and @SuperSparkplug are still investigating. I’ll be wading through the code as you suggested and hopefully we’ll find something to help us out.

1 Like

We narrowed it down:

Seems to be an issue related to the preview button in the animation window. Still investigating…

As you can see in this video, when previewing a skinned mesh renderer’s animation and then observing other skinned mesh renderers in the scene view while that original preview is still active, the posing error occurs. This also seems to NOT occur, when the other skinned mesh renderers begin the “preview mode” within the view frame.

We’re going to continue to investigate… I’m currently set to try another unity version and see if that changes the behaviour.

Also after this video was recorded I also tried removing the Animation Rigging package and the error still occurs (though I may need to test this more thoroughly).

Thanks again for your input.
Z

oh wow that is very weird! First preview was okay, then the second one broke the other models.
btw spotted in that video - no chance “Remember Animator” is doing anything fishy, right?

Another option which might require some investigating - sometimes when duplicating game objects or copy-pasting components, people keep the old references. For example if you have the Rig Builder component on this game object, then you Copy Component and Paste on another game object - maybe someone forgot to change the referenced fields?
So when you change one game object it actually affects others cause they all reference the same underlying Object.

To check this I would take one of the other models - like the one in the office that changed - expand all the attached components, and click each one one by one, making sure that whatever it “pings” lives in correct hierarchy. (hopefully that made sense :smile:)

Also, I just confirmed, that this bug still exists in higher versions of Unity. I tried 2 newer versions of Unity with a duplicate project, including the most recent version, and it’s still happening.

I also tried copying all the characters in one scene into an empty scene and it still happened, so it’s not any of our usual overarching systems in each level that are causing this either.

Something which I’m wondering might be related that I noticed a while ago, but never mentnion. On almost every character I’m noticing a lot of yellow missing parameters in their animation clip alongside valid parameters in the animator. As they are Read-Only, I can’t remove them or edit them. However, I wonder if this is also related to the issue. These missing parameters do have keys, so I wonder if this is causing an error. This is probably a problem regardless so how might one clear this? Is there an easy way to clear it?


These animation warnings shouldn’t cause issues - if the clips are read-only it means they’re coming from an imported model, and that references bones that don’t exist in your models.
You could try making a local copy of the clip (select the clip inside the imported model in your project, and press Ctrl+D or duplicate) and deleting the “missing” properties. HOWEVER note that they might be missing for some models but exist for others - in which case deleting them from the clip will of course make them not work for any models - including ones that do have these bones.

That’s interesting - but doesn’t answer my questions above about cross-references or any additional components you use on the characters :slight_smile:

The best way of figuring this out is creating an entirely new project, pulling things into it one by one, and seeing what causes it.

  • Create a new project with nothing but your models and animations, put them in a scene, and play with it to see if it happens.
  • If it doesn’t - add the Animation Rigging package and try again (if it happens at this point it means it’s a package bug - and you can report to Unity!)
  • If it still doesn’t - this is when you need to start bringing in your own scripts until it breaks. I would start from the animation-specific ones (that “Remember Animator” for example)

Hey evyatron,

I’m working on #1 now, getting a new project setup and importing our stuff. So far the bug has not been replicated but I’m still working on that.

Just wanted to update that Removing the RememberAnimator Components had no effect on the bug. Also as a test I disabled the Animator component and when doing that the bug DID NOT occur on character’s with the Animator disabled.

I’ve also played around with changing the types of Animation Avatars from humanoid to generic, and that seems to have fixed the problem for now for the background characters (the single color models), but hasn’t helped with the “main” fully textured characters. So I’m still investigating that.

What we do know for sure now is SOMETHING is affecting the bones’ transforms via the Animator component.

1 Like

The plot thickens!

Have you also tried removing the two other components btw - Rig Builder and Bone Renderer? I don’t know them and what they do, but you never know! And if it’s easy to remove, it might be much quicker to check than a new project and everything.

Another thing to maybe check is whether Undo fixes the broken models. If you’re lucky and it does - you can open the Undo History window (Edit > Undo History) and see what the name of that Undo operation is, that could be a hint. You could also then try searching for that in the entire solution (including packages and plugins) - you might get lucky and locate it!

This plot is so thiccc lol

Rig Builder and Bone Renderer are both from Animation Rigging Package so Im pretty sure they have an alibi when I removed the package previously.

And alas Undo does not work, my not-so-good temp solution is that after the models get posed I can save the sign and then ditch the scene edits in Plastic (our version control). This is fine for me now as Im mostly just testing this, but obviously would NOT BE GOOD if someone had multiple hours of scene work to push before this happened.

This is very clearly happening only when the models are “observed” so I’m wondering now if there’s not another internal function call (like OnValidate) that would happen when a model is viewed? And maybe that could help spawn some more leads???

There is an OnRenderObject message that might be related - however it’s also very likely coming from an Editor script in which case it might be in some OnGui method.

Also looking back at the video - it looks like all the models got messed up EXCEPT for the one standing in between the rooms - which is also the only one that doesn’t seem to have his rig visualised (presumably by the Bone Renderer).

Hello, avatar creator here, I’m having the same issue. However, the only thing I have in my scene is the avatar itself. I’m unsure of how exactly this happened for me, but I do remember editing and messing with animations in the animator. I have absolutely no additional plugins that would cause it and I’m using Unity version 2019.3.31f1. Hopefully this information helps in solving the issue, as I do not know much about scripting just yet. I simply go from Blender to Unity, using Unity to finalize the avatars.

@johnyurko14 do you have the Animation Rigging Unity package install from the package manager, and if so what is the version number?

And if you could possibly get a video of this error happening I would greatly appreciate you sharing that with us.

And thank you evyatron, I will investigate those methods further and report back.

I do not have that package. I did manage to find a fix good enough for what I need for my needs. Its called Pumkins Avatar Tools. im simply able to load a t-pose animation onto the avatar.