user 41270a34f5 Refactor: 전체 에디터 UXML 전환 + 대시보드/런타임 UI + 한글화 + NanumGothic 폰트
- 모든 컨트롤러 에디터를 IMGUI → UI Toolkit(UXML/USS)으로 전환
  (Camera, Item, Event, Avatar, System, StreamDeck, OptiTrack, Facial)
- StreamingleCommon.uss 공통 테마 + 개별 에디터 USS 스타일시트
- SystemController 서브매니저 분리 (OptiTrack, Facial, Recording, Screenshot 등)
- 런타임 컨트롤 패널 (ESC 토글, 좌측 오버레이, 150% 스케일)
- 웹 대시보드 서버 (StreamingleDashboardServer) + 리타게팅 통합
- 설정 도구(StreamingleControllerSetupTool) UXML 재작성 + 원클릭 설정
- SimplePoseTransfer UXML 에디터 추가
- 전체 UXML 한글화 + NanumGothic 폰트 적용
- Streamingle.Debug → Streamingle.Debugging 네임스페이스 변경 (Debug.Log 충돌 해결)
- 불필요 코드 제거 (rawkey.cs, RetargetingHTTPServer, OptitrackSkeletonAnimator 등)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 02:51:43 +09:00

79 lines
2.0 KiB
C#

using UnityEngine;
using System;
#if MAGICACLOTH2
using MagicaCloth2;
#endif
/// <summary>
/// MagicaCloth2 시뮬레이션 리셋 관리
/// </summary>
[Serializable]
public class ClothSimulationManager
{
private Action<string> log;
private Action<string> logError;
public void Initialize(Action<string> log, Action<string> logError)
{
this.log = log;
this.logError = logError;
}
#if MAGICACLOTH2
public void RefreshAllMagicaCloth(bool keepPose = false)
{
var allMagicaCloths = UnityEngine.Object.FindObjectsByType<MagicaCloth>(FindObjectsSortMode.None);
if (allMagicaCloths == null || allMagicaCloths.Length == 0)
{
log?.Invoke("씬에 MagicaCloth 컴포넌트가 없습니다.");
return;
}
int resetCount = 0;
foreach (var cloth in allMagicaCloths)
{
if (cloth != null && cloth.IsValid())
{
try
{
cloth.ResetCloth(keepPose);
resetCount++;
}
catch (Exception e)
{
logError?.Invoke($"MagicaCloth 리셋 실패 ({cloth.gameObject.name}): {e.Message}");
}
}
}
log?.Invoke($"MagicaCloth 시뮬레이션 리셋 완료 ({resetCount}/{allMagicaCloths.Length}개)");
}
public void ResetAllMagicaCloth()
{
RefreshAllMagicaCloth(false);
}
public void ResetAllMagicaClothKeepPose()
{
RefreshAllMagicaCloth(true);
}
#else
public void RefreshAllMagicaCloth(bool keepPose = false)
{
logError?.Invoke("MagicaCloth2가 설치되어 있지 않습니다.");
}
public void ResetAllMagicaCloth()
{
logError?.Invoke("MagicaCloth2가 설치되어 있지 않습니다.");
}
public void ResetAllMagicaClothKeepPose()
{
logError?.Invoke("MagicaCloth2가 설치되어 있지 않습니다.");
}
#endif
}