- PropBrowserWindow: Unity 에디터용 프랍 브라우저 - 개별 프리펩 단위로 표시 (폴더별 묶음 X) - 씬 조명 기반 썸네일 생성 - 앞쪽에서 촬영하도록 카메라 각도 수정 - WebsitePropExporter: 웹 API 업로드 기능 - 개별 프리펩별 썸네일 URL 지원 - PropSyncSettings: API 및 Git URL 설정 - PropData: 프랍 데이터 구조체 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
63 lines
2.3 KiB
C#
63 lines
2.3 KiB
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace Streamingle.Prop.Editor
|
|
{
|
|
/// <summary>
|
|
/// 프랍 동기화 설정을 저장하는 ScriptableObject
|
|
/// </summary>
|
|
[CreateAssetMenu(fileName = "PropSyncSettings", menuName = "Streamingle/Prop Sync Settings")]
|
|
public class PropSyncSettings : ScriptableObject
|
|
{
|
|
[Header("웹사이트 API 설정")]
|
|
[Tooltip("프랍 API 엔드포인트 URL (예: https://minglestudio.co.kr/api/props)")]
|
|
public string apiEndpoint = "https://minglestudio.co.kr/api/props";
|
|
|
|
[Tooltip("API 인증 키 (선택사항)")]
|
|
public string apiKey = "";
|
|
|
|
[Header("Git 설정 (썸네일 URL용)")]
|
|
[Tooltip("Git 서버 URL (예: https://kindnick-git.duckdns.org)")]
|
|
public string gitServerUrl = "https://kindnick-git.duckdns.org";
|
|
|
|
[Tooltip("Git 리포지토리 경로 (예: kindnick/Streamingle_URP)")]
|
|
public string gitRepoPath = "kindnick/Streamingle_URP";
|
|
|
|
[Tooltip("Git 브랜치 (예: main)")]
|
|
public string gitBranch = "main";
|
|
|
|
[Header("웹사이트 설정")]
|
|
[Tooltip("프랍 페이지 URL (브라우저에서 열기용)")]
|
|
public string websiteUrl = "https://minglestudio.co.kr/props";
|
|
|
|
/// <summary>
|
|
/// Git Media 파일 URL 생성 (Gitea 형식)
|
|
/// </summary>
|
|
public string GetGitRawUrl(string assetPath)
|
|
{
|
|
// Assets/ResourcesData/Prop/... 형식의 경로를 Git Media URL로 변환
|
|
string relativePath = assetPath.Replace("\\", "/");
|
|
|
|
// 경로의 각 세그먼트를 URL 인코딩 (슬래시는 유지)
|
|
string[] segments = relativePath.Split('/');
|
|
for (int i = 0; i < segments.Length; i++)
|
|
{
|
|
segments[i] = Uri.EscapeDataString(segments[i]);
|
|
}
|
|
string encodedPath = string.Join("/", segments);
|
|
|
|
return $"{gitServerUrl}/{gitRepoPath}/media/branch/{gitBranch}/{encodedPath}";
|
|
}
|
|
|
|
/// <summary>
|
|
/// API 설정이 유효한지 확인
|
|
/// </summary>
|
|
public bool IsValid()
|
|
{
|
|
return !string.IsNullOrEmpty(apiEndpoint) &&
|
|
!string.IsNullOrEmpty(gitServerUrl) &&
|
|
!string.IsNullOrEmpty(gitRepoPath);
|
|
}
|
|
}
|
|
}
|