2626
2727- 로딩 중 상태 표시
2828- 각 단계별 진행률 표시
29- - 준비 완료 시 "게임 시작" 버튼 활성화
29+ - 준비 완료 시 "앱 시작" 버튼 활성화
3030- 페이드 인/아웃 효과로 씬 전환
3131
3232## 아키텍처 설계
3333
34- ### 선택된 접근 방식: 이벤트 기반 시스템 (GameManager 중심)
34+ ### 선택된 접근 방식: 이벤트 기반 시스템 (SystemManager 중심)
3535
3636** 선택 이유:**
37- - GameManager가 모든 씬에서 지속되는 싱글톤
37+ - SystemManager가 모든 씬에서 지속되는 싱글톤
3838- StartupManager는 Start 씬에서만 존재
3939- 이벤트 구독을 통한 효율적인 상태 관리
40- - 기존 GameManager 시스템과의 완벽한 통합
40+ - 기존 SystemManager 시스템과의 완벽한 통합
4141
4242### 시스템 구성요소
4343
4444```
45- GameManager (DontDestroyOnLoad)
45+ SystemManager (DontDestroyOnLoad)
4646├── InitializationPhase 이벤트 발생
4747├── Progress 이벤트 발생
4848└── 완료/에러 이벤트 발생
4949 ↓ (이벤트 구독)
5050LoadingManager (Start 씬 전용)
51- ├── GameManager 이벤트 구독
51+ ├── SystemManager 이벤트 구독
5252├── LoadingUI 제어
5353└── SceneTransitionManager 호출
5454 ↓
@@ -58,14 +58,14 @@ SceneTransitionManager (싱글톤)
5858
5959### 이벤트 기반 동작 흐름
6060
61- 1 . ** GameManager ** : 초기화 진행하며 이벤트 발생
62- 2 . ** LoadingManager** : GameManager 이벤트 구독하여 UI 업데이트
61+ 1 . ** SystemManager ** : 초기화 진행하며 이벤트 발생
62+ 2 . ** LoadingManager** : SystemManager 이벤트 구독하여 UI 업데이트
63633 . ** LoadingUI** : 진행 상황 표시 및 사용자 상호작용
64644 . ** SceneTransitionManager** : 씬 전환 관리
6565
6666## 구현된 클래스
6767
68- ### 1. GameManager (확장됨)
68+ ### 1. SystemManager (확장됨)
6969
7070``` csharp
7171public enum InitializationPhase
@@ -77,16 +77,16 @@ public enum InitializationPhase
7777 Completed
7878}
7979
80- public class GameManager : Singleton <GameManager >
80+ public class SystemManager : Singleton <SystemManager >
8181{
8282 // 이벤트
8383 public event Action <InitializationPhase > OnPhaseChanged ;
8484 public event Action <float > OnProgressChanged ;
85- public event Action OnGameInitialized ;
85+ public event Action OnAppInitialized ;
8686 public event Action <string > OnInitializationError ;
8787
8888 // 비동기 초기화
89- public async UniTask InitializeGameAsync ();
89+ public async UniTask InitializeAppAsync ();
9090
9191 // 상태 조회
9292 public InitializationStatus GetInitializationStatus ();
@@ -104,24 +104,24 @@ public class GameManager : Singleton<GameManager>
104104``` csharp
105105public class LoadingManager : MonoBehaviour
106106{
107- // GameManager 이벤트 구독
108- private void SubscribeToGameManager ();
107+ // SystemManager 이벤트 구독
108+ private void SubscribeToSystemManager ();
109109
110110 // 초기화 시작
111111 public async void StartInitialization ();
112112
113- // 게임 시작 (씬 전환)
114- public async void StartGame ();
113+ // 앱 시작 (씬 전환)
114+ public async void StartApp ();
115115
116116 // 이벤트 핸들러
117117 private void OnPhaseChanged (InitializationPhase phase );
118118 private void OnProgressChanged (float progress );
119- private void OnGameInitialized ();
119+ private void OnAppInitialized ();
120120}
121121```
122122
123123** 주요 기능:**
124- - GameManager 이벤트 구독 관리
124+ - SystemManager 이벤트 구독 관리
125125- LoadingUI와 연동
126126- 초기화 완료 시 씬 전환 처리
127127
@@ -176,9 +176,9 @@ public class SceneTransitionManager : Singleton<SceneTransitionManager>
176176
177177```
1781781. StartScene 로드
179- 2. LoadingManager 생성 및 GameManager 이벤트 구독
179+ 2. LoadingManager 생성 및 SystemManager 이벤트 구독
1801803. LoadingManager.StartInitialization() 호출
181- 4. GameManager.InitializeGameAsync () 실행
181+ 4. SystemManager.InitializeAppAsync () 실행
182182 ├── Phase: InitializingManagers (0% → 40%)
183183 ├── Phase: ConnectingToServer (40% → 80%)
184184 └── Phase: LoadingResources (80% → 100%)
@@ -189,22 +189,22 @@ public class SceneTransitionManager : Singleton<SceneTransitionManager>
189189### 2. 이벤트 흐름
190190
191191```
192- GameManager LoadingManager LoadingUI
192+ SystemManager LoadingManager LoadingUI
193193 | | |
194194 |──OnPhaseChanged──────────────▶| |
195195 | |──UpdatePhase──────────▶|
196196 | | |
197197 |──OnProgressChanged───────────▶| |
198198 | |──UpdateProgress───────▶|
199199 | | |
200- |──OnGameInitialized ───────────▶| |
200+ |──OnAppInitialized─ ───────────▶| |
201201 | |──ShowStartButton──────▶|
202202```
203203
204204## 주요 개선사항
205205
206206### 1. 이벤트 기반 아키텍처
207- - ** 분리된 관심사** : GameManager는 초기화, LoadingManager는 UI 관리
207+ - ** 분리된 관심사** : SystemManager는 초기화, LoadingManager는 UI 관리
208208- ** 유연한 확장** : 새로운 구독자 추가 용이
209209- ** 생명주기 독립성** : Start 씬 전용 컴포넌트와 전역 싱글톤 분리
210210
@@ -224,7 +224,7 @@ GameManager LoadingManager LoadingUI
224224Assets/
225225├── Core/
226226│ ├── Managers/
227- │ │ └── GameManager .cs (확장됨)
227+ │ │ └── SystemManager .cs (확장됨)
228228│ └── Loading/
229229│ ├── LoadingManager.cs
230230│ ├── LoadingUI.cs
@@ -245,9 +245,9 @@ Assets/
2452453 . UI 요소들 (ProgressBar, StatusText, StartButton 등) 연결
2462464 . 다음 씬 이름 설정
247247
248- ### 2. GameManager 설정
248+ ### 2. SystemManager 설정
249249
250- - 기존 GameManager 설정 그대로 사용
250+ - 기존 SystemManager 설정 그대로 사용
251251- 자동 초기화 옵션 유지 또는 LoadingManager에서 수동 호출
252252
253253### 3. 씬 전환 설정
@@ -258,7 +258,7 @@ Assets/
258258## 고려사항
259259
260260### 1. 성능 최적화
261- - GameManager 이벤트는 Start 씬에서만 구독
261+ - SystemManager 이벤트는 Start 씬에서만 구독
262262- 메모리 누수 방지를 위한 적절한 구독 해제
263263- 불필요한 업데이트 최소화
264264
@@ -274,4 +274,4 @@ Assets/
274274
275275## 결론
276276
277- 이벤트 기반 아키텍처를 통해 GameManager의 전역적 특성과 LoadingManager의 씬 전용 특성을 효과적으로 분리했습니다. 이를 통해 유지보수성과 확장성을 높이면서도 사용자에게 명확한 초기화 진행 상황을 제공할 수 있습니다.
277+ 이벤트 기반 아키텍처를 통해 SystemManager의 전역적 특성과 LoadingManager의 씬 전용 특성을 효과적으로 분리했습니다. 이를 통해 유지보수성과 확장성을 높이면서도 사용자에게 명확한 초기화 진행 상황을 제공할 수 있습니다.
0 commit comments