40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using System;
|
|
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 "기타";
|
|
}
|
|
}
|
|
|
|
}
|