Search Issue Tracker

Fixed in 2.6.0-preview.3

Votes

0

Found in [Package]

2.6.0, 2.5.0

Issue ID

1234813

Regression

Yes

[Cinemachine] MissingReferenceException errors are thrown on removing "CinemachineFreeLook" component from FreeLook camera

Package: Cinemachine

-

MissingReferenceException errors are thrown on removing "CinemachineFreeLook" component from FreeLook camera.

Steps to repro:
1. Create a new project.
2. Windows > Package Manager> Cinemachine (2.6.0) > Install.
3. Create a FreeLook Camera from Cinemachine menu.
4. Remove "CinemachineFreeLook" component from the Inspector.
5. Expand CM FreeLook game object and select any child.

Actual Result:
MissingReferenceException errors are thrown in the console.

Expected Result:
No errors in the console.

Reproducible in:
2020.2.0a7, 2020.2.0a5, 2020.1.0b5, 2019.3.0f1, 2019.2.0f1, 2019.1.0f1 with Package version 2.6.0, 2.5.0.

2018.4.16f1 with 2.5.0, 2.2.10 - preview 3.

Working Fine in:
2018.4.16f1 with 2.2.9.

Environment:
Occurring on Windows 10 & Mac 10.15.

Stack trace:
MissingReferenceException: The object of type 'CinemachineFreeLook' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
Cinemachine.CinemachineVirtualCameraBase.UpdateSlaveStatus () (at Library/PackageCache/com.unity.cinemachine@2.5.0/Runtime/Core/CinemachineVirtualCameraBase.cs:379)
Cinemachine.CinemachineVirtualCameraBase.get_ParentCamera () (at Library/PackageCache/com.unity.cinemachine@2.5.0/Runtime/Core/CinemachineVirtualCameraBase.cs:233)
Cinemachine.CinemachineBrain.IsLive (Cinemachine.ICinemachineCamera vcam, System.Boolean dominantChildOnly) (at Library/PackageCache/com.unity.cinemachine@2.5.0/Runtime/Behaviours/CinemachineBrain.cs:682)
Cinemachine.CinemachineCore.IsLive (Cinemachine.ICinemachineCamera vcam) (at Library/PackageCache/com.unity.cinemachine@2.5.0/Runtime/Core/CinemachineCore.cs:385)
Cinemachine.CinemachineFreeLook.UpdateXAxisHeading (Cinemachine.CinemachineOrbitalTransposer orbital, System.Single deltaTime, UnityEngine.Vector3 up) (at Library/PackageCache/com.unity.cinemachine@2.5.0/Runtime/Behaviours/CinemachineFreeLook.cs:623)
Cinemachine.CinemachineOrbitalTransposer.MutateCameraState (Cinemachine.CameraState& curState, System.Single deltaTime) (at Library/PackageCache/com.unity.cinemachine@2.5.0/Runtime/Components/CinemachineOrbitalTransposer.cs:309)
Cinemachine.CinemachineVirtualCamera.CalculateNewState (UnityEngine.Vector3 worldUp, System.Single deltaTime) (at Library/PackageCache/com.unity.cinemachine@2.5.0/Runtime/Behaviours/CinemachineVirtualCamera.cs:466)
Cinemachine.CinemachineVirtualCamera.InternalUpdateCameraState (UnityEngine.Vector3 worldUp, System.Single deltaTime) (at Library/PackageCache/com.unity.cinemachine@2.5.0/Runtime/Behaviours/CinemachineVirtualCamera.cs:136)
Cinemachine.CinemachineCore.UpdateVirtualCamera (Cinemachine.CinemachineVirtualCameraBase vcam, UnityEngine.Vector3 worldUp, System.Single deltaTime) (at Library/PackageCache/com.unity.cinemachine@2.5.0/Runtime/Core/CinemachineCore.cs:312)
Cinemachine.CinemachineCore.UpdateAllActiveVirtualCameras (System.Int32 layerMask, UnityEngine.Vector3 worldUp, System.Single deltaTime) (at Library/PackageCache/com.unity.cinemachine@2.5.0/Runtime/Core/CinemachineCore.cs:247)
Cinemachine.CinemachineBrain.UpdateVirtualCameras (Cinemachine.CinemachineCore+UpdateFilter updateFilter, System.Single deltaTime) (at Library/PackageCache/com.unity.cinemachine@2.5.0/Runtime/Behaviours/CinemachineBrain.cs:359)
Cinemachine.CinemachineBrain.LateUpdate () (at Library/PackageCache/com.unity.cinemachine@2.5.0/Runtime/Behaviours/CinemachineBrain.cs:309)

Comments (1)

  1. XochiInteractive

    Jan 20, 2021 05:47

    I'm using Unity 2019.3.6f1 and am currently having this issue. I created a FreeLook camera prefab to put in all of my scenes, removed the old FreeLook camera and added in the prefab and have this error constantly running in my editor. Any way to resolve this issue? I tried closing the editor and restarting Unity but the error is still present.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.