public static SceneData GetInstance() { if (!instance) { instance = (SceneData)GameObject.FindObjectOfType(typeof(SceneData)); if (!instance) Debug.LogError("There needs to be one active v script on a GameObject in your scene."); instance.Start(); } return instance; }