diff --git a/SceneReference.cs b/SceneReference.cs index 615e1a6..a05abe5 100644 --- a/SceneReference.cs +++ b/SceneReference.cs @@ -61,6 +61,11 @@ public string ScenePath m_ScenePath = value; #if UNITY_EDITOR + if (string.IsNullOrEmpty(m_ScenePath)) { + m_SceneAsset = null; + return; + } + m_SceneAsset = AssetDatabase.LoadAssetAtPath(m_ScenePath); if (m_SceneAsset == null) { Debug.LogError($"Setting {nameof(SceneReference)} to {value}, but no scene could be located there.");