private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { currentScene = scene.name; Vector3 position = PlayerSpawner.GetRespawnById(warpId); GameObject character = Instantiate(characterPrefab, position, Quaternion.identity); Instantiate(characterSpawnEffect, position, Quaternion.identity); Cinemachine.CinemachineVirtualCamera vcam = GameObject.FindObjectOfType <Cinemachine.CinemachineVirtualCamera>(); if (vcam != null) { vcam.Follow = character.transform; } }