최초 프로젝트 오픈 화면에서 파일을 선택하지 않아도 Open 되어버리는 문제 수정 #124
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user