From 3eed27c15dc1774fbbb29b28a00c055ca52dc3f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=98=81=EB=AF=BC?= <117150306+jym04@users.noreply.github.com> Date: Wed, 11 Jun 2025 16:39:39 +0900 Subject: [PATCH] =?UTF-8?q?=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=20=EC=8B=9C=20=EC=9D=B4=EB=AF=B8=20=ED=95=B4?= =?UTF-8?q?=EB=8B=B9=20=ED=8C=8C=EC=9D=BC=EC=9D=B4=20=EC=A1=B4=EC=9E=AC=20?= =?UTF-8?q?=ED=95=98=EB=8A=94=EC=A7=80=20=ED=99=95=EC=9D=B8=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EA=B8=B0=EB=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Studio/UI/Panel/Panel_NewProjectInfo.cs | 13 ++++++++++++- .../Studio/UI/Panel/Panel_TopMenuNewProjectInfo.cs | 14 +++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Studio/UI/Panel/Panel_NewProjectInfo.cs b/Assets/Scripts/Studio/UI/Panel/Panel_NewProjectInfo.cs index 878547a7..40691c8a 100644 --- a/Assets/Scripts/Studio/UI/Panel/Panel_NewProjectInfo.cs +++ b/Assets/Scripts/Studio/UI/Panel/Panel_NewProjectInfo.cs @@ -47,7 +47,7 @@ namespace Studio.UI var projectName = GetProjectName(); var projectPath = GetProjectRoute(); - if (!IsProjectNameVaild(projectName) || !IsProjectPathVaild(projectPath)) + if (!IsProjectNameVaild(projectName) || !IsProjectPathVaild(projectPath) || !IsProjectExistVaild()) { return; } @@ -95,6 +95,17 @@ namespace Studio.UI } return true; } + private bool IsProjectExistVaild() + { + var projectPath = InputField_ProjectRoute.text; + var projectNameAndExtension = $"{InputField_ProjectName.text}.ocs"; + var filePath = Path.Combine(projectPath, projectNameAndExtension); + if (File.Exists(filePath)) + { + return false; + } + return true; + } } } diff --git a/Assets/Scripts/Studio/UI/Panel/Panel_TopMenuNewProjectInfo.cs b/Assets/Scripts/Studio/UI/Panel/Panel_TopMenuNewProjectInfo.cs index 25a8b377..df24aa88 100644 --- a/Assets/Scripts/Studio/UI/Panel/Panel_TopMenuNewProjectInfo.cs +++ b/Assets/Scripts/Studio/UI/Panel/Panel_TopMenuNewProjectInfo.cs @@ -41,7 +41,7 @@ namespace Studio.UI var projectName = GetProjectName(); var projectPath = GetProjectRoute(); - if (!IsProjectNameVaild(projectName) || !IsProjectPathVaild(projectPath)) + if (!IsProjectNameVaild(projectName) || !IsProjectPathVaild(projectPath) || IsProjectExistVaild()) { return; } @@ -87,5 +87,17 @@ namespace Studio.UI } return true; } + private bool IsProjectExistVaild() + { + var projectPath = InputField_ProjectRoute.text; + var projectNameAndExtension = $"{InputField_ProjectName.text}.ocs"; + + var filePath = Path.Combine(projectPath, projectNameAndExtension); + if (File.Exists(filePath)) + { + return false; + } + return true; + } } }