Hello @gamingislove just wanted to report when changing scenes, and using the ORK_Cinemachine_CameraControlWrapper script, the ActiveVirtualCamera is not assigned. I've been debugging for an hour, and these are my findings, and quick workaround/fix

NullReferenceException: Object reference not set to an instance of an object
GamingIsLove.ORKFramework.Components.ORK_Cinemachine_CameraControlWrapper.CameraTargetChanged (UnityEngine.GameObject oldTarget, UnityEngine.GameObject newTarget) (at Assets/Gaming Is Love/Makinom 2/Plugins/Scripts/ORK_Cinemachine_CameraControlWrapper.cs:85)
GamingIsLove.ORKFramework.Components.ORK_Cinemachine_CameraControlWrapper.LateUpdate () (at Assets/Gaming Is Love/Makinom 2/Plugins/Scripts/ORK_Cinemachine_CameraControlWrapper.cs:117)

And the the culprit is at like 85

this.cameraControl.ActiveVirtualCamera.Follow = newTarget.transform;

the ActiveVirtualCamera is null for some weird reason

A quick hack was to add a null check in LateUpdate()

protected void LateUpdate()
{
if (cameraControl.ActiveVirtualCamera == null) return;

//....
  • Hm, I'll look into it, though shouldn't that be set by the scene's Cinemachine camera?
    Is there a virtual camera in the loaded scene?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Uploaded an updated wrapper script that prevents that error from happening.
    It also has a new setting to automatically update a the new active camera to target the current camera target.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.