diff --git a/Assets/Scripts/Studio/UI/Panel/Panel_OpenProjectInfo.cs b/Assets/Scripts/Studio/UI/Panel/Panel_OpenProjectInfo.cs index 7925fbd4..f3c929ef 100644 --- a/Assets/Scripts/Studio/UI/Panel/Panel_OpenProjectInfo.cs +++ b/Assets/Scripts/Studio/UI/Panel/Panel_OpenProjectInfo.cs @@ -47,6 +47,9 @@ namespace Studio.UI private void OnEndEditProjectRoute(string input) { + if (!IsPathVaild(input)) + return; + Footer.gameObject.SetActive(true); var name = Path.GetFileNameWithoutExtension(input); Text_ProjectName.text = name; @@ -119,5 +122,19 @@ namespace Studio.UI var route = InputField_ProjectRoute.text; return route; } + private bool IsPathVaild(string path) + { + if(path == string.Empty) + { + Debug.Log("The project path entry field is empty"); + return false; + } + else if (!File.Exists(path)) + { + Debug.Log("The path you entered is not a valid path"); + return false; + } + return true; + } } }