Search Unity

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

Discussion in 'Cinemachine' started by arvzg, Nov 30, 2017.

  1. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    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:

    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.
     
    OlegPavlov likes this.
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    @arvzg 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?
     
  3. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    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
     
  4. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    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:

    upload_2017-12-1_1-29-47.png
     
  5. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    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.
     
  6. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    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.
     
  7. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    hmmm.... let me try with the same Unity as you
     
  8. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    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)
     
  9. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    Opened your project with same Unity, scene was already opened, no warnings:
    upload_2017-11-30_10-27-22.png
     
  10. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    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?
     
  11. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    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'?
     
  12. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    How very interesting.

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

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

    upload_2017-11-30_11-44-56.png

    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?
     
  13. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    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
     
  14. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    Was PostProcessing ever a part of this project?
     
  15. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    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.
     
  16. mounirah

    mounirah

    Joined:
    Dec 5, 2021
    Posts:
    1
    I'm facing the same problem
     
    DSivtsov likes this.
  17. DSivtsov

    DSivtsov

    Joined:
    Feb 20, 2019
    Posts:
    151
    The same as in the thread
     
  18. DreamSpaceYL

    DreamSpaceYL

    Joined:
    May 23, 2017
    Posts:
    2
    I'm facing the same problem in unity 2022.2.1f1c1
     

    Attached Files:

  19. DreamSpaceYL

    DreamSpaceYL

    Joined:
    May 23, 2017
    Posts:
    2
    I used global volume in URP
     
  20. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,290
    This is still happening in 2022.3.4