Fix : 대소문자 구분 업데이트

This commit is contained in:
user 2026-01-08 02:44:04 +09:00
parent 8a7a8679d6
commit a6236d887c
15 changed files with 40 additions and 4 deletions

View File

@ -383,6 +383,25 @@ namespace Streamingle.Background.Editor
RefreshSceneList();
}
/// <summary>
/// Scene 또는 scene 폴더를 실제 대소문자로 찾기
/// Windows는 대소문자를 구분하지 않지만, Git/Linux는 구분하므로 정확한 이름이 필요
/// </summary>
private string FindSceneFolderWithCorrectCase(string parentFolder)
{
var subDirs = Directory.GetDirectories(parentFolder);
foreach (var dir in subDirs)
{
string dirName = Path.GetFileName(dir);
if (string.Equals(dirName, "Scene", StringComparison.OrdinalIgnoreCase))
{
// 실제 폴더 이름 반환 (scene 또는 Scene)
return dir;
}
}
return null;
}
private void RefreshSceneList()
{
if (_database == null) return;
@ -401,9 +420,9 @@ namespace Streamingle.Background.Editor
foreach (var folderPath in backgroundFolders)
{
string folderName = Path.GetFileName(folderPath);
string sceneFolderPath = Path.Combine(folderPath, "Scene");
string sceneFolderPath = FindSceneFolderWithCorrectCase(folderPath);
if (!Directory.Exists(sceneFolderPath))
if (sceneFolderPath == null)
{
// Scene 폴더가 없으면 루트에서 .unity 파일 검색
sceneFolderPath = folderPath;

View File

@ -178,6 +178,23 @@ namespace Streamingle.Background.Editor
"Assets/Resources/Settings/BackgroundSceneDatabase.asset");
}
/// <summary>
/// Scene 또는 scene 폴더를 실제 대소문자로 찾기
/// </summary>
private string FindSceneFolderWithCorrectCase(string parentFolder)
{
var subDirs = Directory.GetDirectories(parentFolder);
foreach (var dir in subDirs)
{
string dirName = Path.GetFileName(dir);
if (string.Equals(dirName, "Scene", StringComparison.OrdinalIgnoreCase))
{
return dir;
}
}
return null;
}
private void RefreshSceneListDirectly()
{
if (_database == null) return;
@ -197,9 +214,9 @@ namespace Streamingle.Background.Editor
foreach (var folderPath in backgroundFolders)
{
string folderName = Path.GetFileName(folderPath);
string sceneFolderPath = Path.Combine(folderPath, "Scene");
string sceneFolderPath = FindSceneFolderWithCorrectCase(folderPath);
if (!Directory.Exists(sceneFolderPath))
if (sceneFolderPath == null)
{
sceneFolderPath = folderPath;
}