UnityEngine.SceneManagement.Scene.IsValid C# (CSharp) Method

IsValid() public method

Whether this is a valid scene. A scene may be invalid if, for example, you tried to open a scene that does not exist. In this case, the scene returned from EditorSceneManager.OpenScene would return False for IsValid.

public IsValid ( ) : bool
return bool
        public bool IsValid()
        {
            return IsValidInternal(this.handle);
        }

Usage Example

コード例 #1
0
 private IEnumerator _UnloadCurrentUIScene()
 {
     if (currentUIScene.IsValid() && currentSceneBase != null)
     {
         yield return(currentSceneBase.Out());
     }
 }
All Usage Examples Of UnityEngine.SceneManagement.Scene::IsValid