Cinemachine new scene - Not Targeting player till my player moves

good morning!

So currently I’m using Cinemachine as a Camera Follow for the player. Both my player and Camera+Virtual Camera are kept persistent through scenes using “DontDestroyOnLoad.”

My only issue is, when my player enters a new scene, the Virtual Camera won’t adjust to my player’s new position until I move, causing this really jarring pan across the whole scene to get the player in frame when I do move.

I tried adding the below script to my virtual camera, but nothing seems to have changed.

Any ideas?

public class FindPlayerAtStart : MonoBehaviour
{
    public Transform playerPos;

    private void OnEnable()
    {
        SceneManager.sceneLoaded += OnLevelLoaded;
    }

    private void OnDisable()
    {
        SceneManager.sceneLoaded -= OnLevelLoaded;
    }

    private void OnLevelLoaded(Scene scene, LoadSceneMode mode)
    {
        float x = transform.position.x;
        float y = transform.position.y;

        x = playerPos.position.x;
        y = playerPos.position.y;
    }
}

Not sure if there’s a better solution, but after some testing I realized that each time a new scene loads, if i simply disable the Virtual Camera, then re-enable it, it centers the camera on the player instantly during the new scene.

Below was my implemented solution, script attached to my virtual camera.
Hopefully this will help you if you ran into the same issues as me!

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using Cinemachine;

public class FindPlayerAtStart : MonoBehaviour
{


    private CinemachineVirtualCamera vCam;

    private void Awake()
    {
        vCam = GetComponent<CinemachineVirtualCamera>();
    }

    private void OnEnable()
    {
        SceneManager.sceneLoaded += OnLevelLoaded;
    }

    private void OnDisable()
    {
        SceneManager.sceneLoaded -= OnLevelLoaded;
    }

    private void OnLevelLoaded(Scene scene, LoadSceneMode mode)
    {
        vCam.enabled = false;
        vCam.enabled = true; //only way I found to recenter the virtual camera on the player each time a new scene loads up
    }
}