So, I’ve got an animated knife as a child of the first person camera. When I click, the knife swings. Everything works great! Except when the scene view isn’t pointed at my player…
If I play the game in a maximized game window, the knife doesn’t render. If I don’t play maximized, but don’t have the scene window on screen, the knife doesn’t render. If I walk out of view of the scene window, the knife doesn’t render.
It’s acting as if the scene view is my “camera,” and when the skinned mesh renderer isn’t displayed by that “camera” it doesn’t render. You’d expect this behavior but with the actual camera instead of the scene view.
I’ve never run into a problem like this before, so I’m very very confused. I’m sure there’s a setting or something that I’m overlooking. Any help is greatly appreciated
I don’t know exactly what fixed it, but I’ve changed a bunch of settings on the knife and camera. For anyone with a similar problem, here are the settings I suspect have something to do with it.
The Animator component has Culling Mode set to Always Animate.
The Skinned Mesh Renderer has Update When Offscreen checked true.
The Skinned Mesh Renderer has Dynamic Occluded set to false.
The Camera has Occlusion Culling set to true.
The Camera has Allow Dynamic Resolution set to false.
I’ll mark this answer as correct and leave the question here so it might help someone else.
The Skinned Mesh Renderer → Update When Offscreen → checked true
does the trick.
However, this isn’t the ideal solution because it lowers the performance as the mesh bounds are remapped all the time. It’s ok if that happens for a single mesh but when you have them hundreds it can really impact the framerate.