The referenced script on this behaviour (Game Object 'cm') is missing!

Hello,

We’ve got 3 Cinemachine Virtual Cameras in our scene and for some reason when we load Unity or enter play mode, we see these:

3305510--256509--upload_2017-11-30_11-10-36.png

As far as I can tell everything seems to be working fine still.

There are hidden ‘cm’ GameObjects as child of each Virtual Camera, and if I unhide them and delete them, the warnings go away, but Cinemachine no longer works.

1 Like

@arvzg_1 Hi and thanks for this post. I’ve seen this crop up from time to time but have not been able to reproduce reliably. Are you getting this consistently? Would you be willing to share your project with me so that I can diagnose?

Hey @Gregoryl absolutely! Here’s a stripped down version of the project:

https://www.dropbox.com/s/90x72d8zijdsloj/CMBugReproduction.zip?dl=0

I’ve removed just about everything from the project except for Cinemachine assets, a Camera Blends file and the scene where the bug is happening.

The warning definitely comes up consistently in Play mode. I’m running Unity 2017.2.0p1 and Cinemachine 2.1.09

Ah so if you remove the CM Virtual Camera component from Ball VC, the hidden cm GameObject reveals itself. There are indeed 2 missing scripts in that GameObject:

Not happening for me. I opened with a different version of unity. Try deleting your Library directory, then re-opening the project. My guess is that the messages will disappear.

Well in making this stripped down project, I copied Assets and Project Settings to another folder and reopened the project (essentially deleting Library folder), and the Warnings are still there.

hmmm… let me try with the same Unity as you

So… obligatory obvious question: You did open the Game Scene and test in there right? It’s specifically Ball VC/cm that’s the problem

I just tested it in 2017.2.0f3 and it happens on that as well. The ‘cm’ GameObject already has 2 missing script references in the scene (even before you do anything)

Opened your project with same Unity, scene was already opened, no warnings:

Missing Script Reference errors are generally about meta file IDs changing. You must have a cache somewhere. What happens if you delete the vcams and re-create them?

Yeah if I delete the Ball VC, then that also deletes the ‘cm’ with missing references, which removes the warnings.

Can you remove the virtual camera component from Ball VC and tell me what the 2 missing references are for you on ‘cm’?

How very interesting.

3306445--256627--upload_2017-11-30_11-43-59.png

Then when I remove the vcam component and look at the cm child:

but no warnings in the console!

If I look at the scene file, the 2 orphans are:

— !u!114 &1975516683
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1975516679}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1116580417}
m_Name:
m_EditorClassIdentifier:
— !u!114 &1975516684
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1975516679}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6df7c0f4ba187214f82cfe2130e620c5, type: 3}
m_Name:
m_EditorClassIdentifier:

I don’t know what those orphan scripts are. They are harmless, but I would like to find out where they came from. Did this scene start out with earlier versions of CM and then get upgraded? If so, what is the history, version-wise?

How very strange indeed that you’re not getting any console warnings despite the missing references.

Nope, we always used the latest Cinemachine from the start, and have never upgraded the version since.

We have switched Unity versions once, coming from 2017.2.0f3 originally, and upgrading to 2017.2.0p1, however this problem didn’t start happening immediately after upgrading and only started happening much later

Was PostProcessing ever a part of this project?

Actually yes, I did add Post Processing Stack from the asset store at one point, but removed it completely from the project shortly after. Not sure if I ever saved the scene with post processing in it though.

I’m facing the same problem

1 Like

The same as in the thread

I’m facing the same problem in unity 2022.2.1f1c1

8729421--1181076--Snipaste_2023-01-14_09-41-20.jpg

I used global volume in URP

This is still happening in 2022.3.4