I’m not sure where to start with this one. Ever since I upgraded to 2.10.0, after I press play, then stop, I sometimes randomly get this error: “CinemachineExtension requires a Cinemachine Virtual Camera component” and when I look at my virtual cameras, their gameobjects all appear to have lost their scripts. If I close and restart Unity, everything is restored. Any ideas what’s going on?
Any errors in the Console?
The only error is this, which is repeated for every virtual camera:
CinemachineExtension requires a Cinemachine Virtual Camera component
UnityEngine.Debug:LogError (object)
Cinemachine.CinemachineExtension:ConnectToVcam (bool) (at ./Library/PackageCache/com.unity.cinemachine@2.10.0/Runtime/Core/CinemachineExtension.cs:67)
Cinemachine.CinemachineExtension:Awake () (at ./Library/PackageCache/com.unity.cinemachine@2.10.0/Runtime/Core/CinemachineExtension.cs:33)
I’ve noticed it happens very often when I start and stop the player quickly, like for less than maybe 20 seconds of runtime. If I run the game for longer than that, it appears much less often.
Do you have save during playmode enabled on the vcam?
No, I don’t use save during playmode, and I just doubled checked to be sure it wasn’t set by accident. I’ve also tried deleting and recreating the cameras from scratch and changing nothing but the follow and lookat targets, but it still happens occasionally. The only extension attached is the impulse listener. Are there any places internal error logs might go other than the console? If so I’ll check and attach anything I find. For now I just close and reopen unity as needed, so it’s not a show stopper, just a bit annoying.
Next time the bug happens can you Ctrl+S the scene and send me the .unity and .meta file of the scene? (Make sure you can revert this)
Yes, it just happened and I saved and copied those files. Where do I send them?
Can you try?
Close the unity project
Delete the library folder
Reopen the project
Assets → Reimport all.
And see if the bug persist or not.
Backup everything before doing this.
oh, doh, I should have tried that from the beginning! I just did and I haven’t seen the bug come back. I think it’s fixed now, thanks!
