using UnityEngine; [System.Serializable] public class SceneReference { [SerializeField] private Object _sceneAsset; [SerializeField] private string _scenePath = ""; // makes it work with the existing Unity methods (LoadLevel/LoadScene) public static implicit operator string(SceneReference sceneReference) => sceneReference._scenePath; }