user f2cd9878cb Feat: 배경 씬 웹 업로드 제외 기능 추가
- BackgroundSceneInfo에 excludeFromWeb 플래그 추가
- WebsiteBackgroundExporter에서 제외된 씬 필터링
- BackgroundSceneLoaderWindow UI 개선:
  - 컨텍스트 메뉴에 '웹사이트 업로드 제외' 토글 추가
  - 그리드 뷰: 제외된 씬에 빨간 X 표시
  - 리스트 뷰: 제외된 씬에 [제외] 텍스트 표시

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 02:52:43 +09:00

85 lines
2.8 KiB
C#

using System;
using System.Collections.Generic;
using UnityEngine;
namespace Streamingle.Background
{
/// <summary>
/// 배경 씬 정보를 담는 데이터 클래스
/// </summary>
[Serializable]
public class BackgroundSceneInfo
{
public string sceneName; // 씬 파일 이름 (확장자 제외)
public string scenePath; // 씬 파일 전체 경로 (Assets/...)
public string categoryName; // 카테고리 (폴더명, 예: [공용]농구장)
public string thumbnailPath; // 썸네일 이미지 경로
public Texture2D thumbnail; // 로드된 썸네일 (런타임용)
public bool excludeFromWeb; // 웹사이트 업로드 제외 여부
public string DisplayName => sceneName;
public string Category => ExtractCategory(categoryName);
private static string ExtractCategory(string folderName)
{
// [공용], [야모], [아이시아] 등 카테고리 추출
if (string.IsNullOrEmpty(folderName)) return "기타";
int start = folderName.IndexOf('[');
int end = folderName.IndexOf(']');
if (start >= 0 && end > start)
{
return folderName.Substring(start + 1, end - start - 1);
}
return "기타";
}
}
/// <summary>
/// 배경 씬 데이터를 저장하는 ScriptableObject
/// </summary>
[CreateAssetMenu(fileName = "BackgroundSceneDatabase", menuName = "Streamingle/Background Scene Database")]
public class BackgroundSceneDatabase : ScriptableObject
{
public List<BackgroundSceneInfo> scenes = new List<BackgroundSceneInfo>();
/// <summary>
/// 카테고리별로 씬 목록 반환
/// </summary>
public Dictionary<string, List<BackgroundSceneInfo>> GetScenesByCategory()
{
var result = new Dictionary<string, List<BackgroundSceneInfo>>();
foreach (var scene in scenes)
{
string category = scene.Category;
if (!result.ContainsKey(category))
{
result[category] = new List<BackgroundSceneInfo>();
}
result[category].Add(scene);
}
return result;
}
/// <summary>
/// 씬 이름으로 검색
/// </summary>
public BackgroundSceneInfo FindByName(string sceneName)
{
return scenes.Find(s => s.sceneName == sceneName);
}
/// <summary>
/// 씬 경로로 검색
/// </summary>
public BackgroundSceneInfo FindByPath(string scenePath)
{
return scenes.Find(s => s.scenePath == scenePath);
}
}
}