Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 060a87e

Browse files
committed
feat: 초기화 완료후 다음 씬으로 이동
1 parent fc2cf05 commit 060a87e

File tree

8 files changed

+380
-27
lines changed

8 files changed

+380
-27
lines changed

‎Assets/App/Scenes/MainSence.unity‎

Lines changed: 263 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,263 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!29 &1
4+
OcclusionCullingSettings:
5+
m_ObjectHideFlags: 0
6+
serializedVersion: 2
7+
m_OcclusionBakeSettings:
8+
smallestOccluder: 5
9+
smallestHole: 0.25
10+
backfaceThreshold: 100
11+
m_SceneGUID: 00000000000000000000000000000000
12+
m_OcclusionCullingData: {fileID: 0}
13+
--- !u!104 &2
14+
RenderSettings:
15+
m_ObjectHideFlags: 0
16+
serializedVersion: 10
17+
m_Fog: 0
18+
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
19+
m_FogMode: 3
20+
m_FogDensity: 0.01
21+
m_LinearFogStart: 0
22+
m_LinearFogEnd: 300
23+
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24+
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25+
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26+
m_AmbientIntensity: 1
27+
m_AmbientMode: 3
28+
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
29+
m_SkyboxMaterial: {fileID: 0}
30+
m_HaloStrength: 0.5
31+
m_FlareStrength: 1
32+
m_FlareFadeSpeed: 3
33+
m_HaloTexture: {fileID: 0}
34+
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35+
m_DefaultReflectionMode: 0
36+
m_DefaultReflectionResolution: 128
37+
m_ReflectionBounces: 1
38+
m_ReflectionIntensity: 1
39+
m_CustomReflection: {fileID: 0}
40+
m_Sun: {fileID: 0}
41+
m_UseRadianceAmbientProbe: 0
42+
--- !u!157 &3
43+
LightmapSettings:
44+
m_ObjectHideFlags: 0
45+
serializedVersion: 13
46+
m_BakeOnSceneLoad: 0
47+
m_GISettings:
48+
serializedVersion: 2
49+
m_BounceScale: 1
50+
m_IndirectOutputScale: 1
51+
m_AlbedoBoost: 1
52+
m_EnvironmentLightingMode: 0
53+
m_EnableBakedLightmaps: 0
54+
m_EnableRealtimeLightmaps: 0
55+
m_LightmapEditorSettings:
56+
serializedVersion: 12
57+
m_Resolution: 2
58+
m_BakeResolution: 40
59+
m_AtlasSize: 1024
60+
m_AO: 0
61+
m_AOMaxDistance: 1
62+
m_CompAOExponent: 1
63+
m_CompAOExponentDirect: 0
64+
m_ExtractAmbientOcclusion: 0
65+
m_Padding: 2
66+
m_LightmapParameters: {fileID: 0}
67+
m_LightmapsBakeMode: 1
68+
m_TextureCompression: 1
69+
m_ReflectionCompression: 2
70+
m_MixedBakeMode: 2
71+
m_BakeBackend: 1
72+
m_PVRSampling: 1
73+
m_PVRDirectSampleCount: 32
74+
m_PVRSampleCount: 512
75+
m_PVRBounces: 2
76+
m_PVREnvironmentSampleCount: 256
77+
m_PVREnvironmentReferencePointCount: 2048
78+
m_PVRFilteringMode: 1
79+
m_PVRDenoiserTypeDirect: 1
80+
m_PVRDenoiserTypeIndirect: 1
81+
m_PVRDenoiserTypeAO: 1
82+
m_PVRFilterTypeDirect: 0
83+
m_PVRFilterTypeIndirect: 0
84+
m_PVRFilterTypeAO: 0
85+
m_PVREnvironmentMIS: 1
86+
m_PVRCulling: 1
87+
m_PVRFilteringGaussRadiusDirect: 1
88+
m_PVRFilteringGaussRadiusIndirect: 1
89+
m_PVRFilteringGaussRadiusAO: 1
90+
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
91+
m_PVRFilteringAtrousPositionSigmaIndirect: 2
92+
m_PVRFilteringAtrousPositionSigmaAO: 1
93+
m_ExportTrainingData: 0
94+
m_TrainingDataDestination: TrainingData
95+
m_LightProbeSampleCountMultiplier: 4
96+
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
97+
m_LightingSettings: {fileID: 0}
98+
--- !u!196 &4
99+
NavMeshSettings:
100+
serializedVersion: 2
101+
m_ObjectHideFlags: 0
102+
m_BuildSettings:
103+
serializedVersion: 3
104+
agentTypeID: 0
105+
agentRadius: 0.5
106+
agentHeight: 2
107+
agentSlope: 45
108+
agentClimb: 0.4
109+
ledgeDropHeight: 0
110+
maxJumpAcrossDistance: 0
111+
minRegionArea: 2
112+
manualCellSize: 0
113+
cellSize: 0.16666667
114+
manualTileSize: 0
115+
tileSize: 256
116+
buildHeightMesh: 0
117+
maxJobWorkers: 0
118+
preserveTilesOutsideBounds: 0
119+
debug:
120+
m_Flags: 0
121+
m_NavMeshData: {fileID: 0}
122+
--- !u!1 &322172995
123+
GameObject:
124+
m_ObjectHideFlags: 0
125+
m_CorrespondingSourceObject: {fileID: 0}
126+
m_PrefabInstance: {fileID: 0}
127+
m_PrefabAsset: {fileID: 0}
128+
serializedVersion: 6
129+
m_Component:
130+
- component: {fileID: 322172998}
131+
- component: {fileID: 322172997}
132+
- component: {fileID: 322172996}
133+
- component: {fileID: 322172999}
134+
m_Layer: 0
135+
m_Name: Main Camera
136+
m_TagString: MainCamera
137+
m_Icon: {fileID: 0}
138+
m_NavMeshLayer: 0
139+
m_StaticEditorFlags: 0
140+
m_IsActive: 1
141+
--- !u!81 &322172996
142+
AudioListener:
143+
m_ObjectHideFlags: 0
144+
m_CorrespondingSourceObject: {fileID: 0}
145+
m_PrefabInstance: {fileID: 0}
146+
m_PrefabAsset: {fileID: 0}
147+
m_GameObject: {fileID: 322172995}
148+
m_Enabled: 1
149+
--- !u!20 &322172997
150+
Camera:
151+
m_ObjectHideFlags: 0
152+
m_CorrespondingSourceObject: {fileID: 0}
153+
m_PrefabInstance: {fileID: 0}
154+
m_PrefabAsset: {fileID: 0}
155+
m_GameObject: {fileID: 322172995}
156+
m_Enabled: 1
157+
serializedVersion: 2
158+
m_ClearFlags: 1
159+
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
160+
m_projectionMatrixMode: 1
161+
m_GateFitMode: 2
162+
m_FOVAxisMode: 0
163+
m_Iso: 200
164+
m_ShutterSpeed: 0.005
165+
m_Aperture: 16
166+
m_FocusDistance: 10
167+
m_FocalLength: 50
168+
m_BladeCount: 5
169+
m_Curvature: {x: 2, y: 11}
170+
m_BarrelClipping: 0.25
171+
m_Anamorphism: 0
172+
m_SensorSize: {x: 36, y: 24}
173+
m_LensShift: {x: 0, y: 0}
174+
m_NormalizedViewPortRect:
175+
serializedVersion: 2
176+
x: 0
177+
y: 0
178+
width: 1
179+
height: 1
180+
near clip plane: 0.3
181+
far clip plane: 1000
182+
field of view: 60
183+
orthographic: 1
184+
orthographic size: 5
185+
m_Depth: -1
186+
m_CullingMask:
187+
serializedVersion: 2
188+
m_Bits: 4294967295
189+
m_RenderingPath: -1
190+
m_TargetTexture: {fileID: 0}
191+
m_TargetDisplay: 0
192+
m_TargetEye: 3
193+
m_HDR: 1
194+
m_AllowMSAA: 1
195+
m_AllowDynamicResolution: 0
196+
m_ForceIntoRT: 0
197+
m_OcclusionCulling: 1
198+
m_StereoConvergence: 10
199+
m_StereoSeparation: 0.022
200+
--- !u!4 &322172998
201+
Transform:
202+
m_ObjectHideFlags: 0
203+
m_CorrespondingSourceObject: {fileID: 0}
204+
m_PrefabInstance: {fileID: 0}
205+
m_PrefabAsset: {fileID: 0}
206+
m_GameObject: {fileID: 322172995}
207+
serializedVersion: 2
208+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
209+
m_LocalPosition: {x: 0, y: 0, z: -10}
210+
m_LocalScale: {x: 1, y: 1, z: 1}
211+
m_ConstrainProportionsScale: 0
212+
m_Children: []
213+
m_Father: {fileID: 0}
214+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
215+
--- !u!114 &322172999
216+
MonoBehaviour:
217+
m_ObjectHideFlags: 0
218+
m_CorrespondingSourceObject: {fileID: 0}
219+
m_PrefabInstance: {fileID: 0}
220+
m_PrefabAsset: {fileID: 0}
221+
m_GameObject: {fileID: 322172995}
222+
m_Enabled: 1
223+
m_EditorHideFlags: 0
224+
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
225+
m_Name:
226+
m_EditorClassIdentifier:
227+
m_RenderShadows: 1
228+
m_RequiresDepthTextureOption: 2
229+
m_RequiresOpaqueTextureOption: 2
230+
m_CameraType: 0
231+
m_Cameras: []
232+
m_RendererIndex: -1
233+
m_VolumeLayerMask:
234+
serializedVersion: 2
235+
m_Bits: 1
236+
m_VolumeTrigger: {fileID: 0}
237+
m_VolumeFrameworkUpdateModeOption: 2
238+
m_RenderPostProcessing: 0
239+
m_Antialiasing: 0
240+
m_AntialiasingQuality: 2
241+
m_StopNaN: 0
242+
m_Dithering: 0
243+
m_ClearDepth: 1
244+
m_AllowXRRendering: 1
245+
m_AllowHDROutput: 1
246+
m_UseScreenCoordOverride: 0
247+
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
248+
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
249+
m_RequiresDepthTexture: 0
250+
m_RequiresColorTexture: 0
251+
m_Version: 2
252+
m_TaaSettings:
253+
m_Quality: 3
254+
m_FrameInfluence: 0.1
255+
m_JitterScale: 1
256+
m_MipBias: 0
257+
m_VarianceClampScale: 0.9
258+
m_ContrastAdaptiveSharpening: 0
259+
--- !u!1660057539 &9223372036854775807
260+
SceneRoots:
261+
m_ObjectHideFlags: 0
262+
m_Roots:
263+
- {fileID: 322172998}

‎Assets/App/Scenes/MainSence.unity.meta‎

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Assets/App/Scenes/StartSence.unity‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ Transform:
166166
m_LocalScale: {x: 1, y: 1, z: 1}
167167
m_ConstrainProportionsScale: 0
168168
m_Children:
169-
- {fileID: 1015393258}
170169
- {fileID: 573203869}
170+
- {fileID: 1015393258}
171171
m_Father: {fileID: 0}
172172
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
173173
--- !u!1 &193680551

‎Assets/Core/Loading/LoadingManager.cs‎

Lines changed: 75 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,18 @@ public class LoadingManager : Singleton<LoadingManager>
3939

4040
private TaskInfo _currentTask;
4141

42-
public event Action OnInitializationCompleted;
4342
public event Action<string> OnInitializationFailed;
4443

4544
#region Unity Lifecycle
4645

47-
// Auto-start 제거 - 명시적으로 StartInitialization() 호출 필요
46+
private void Awake()
47+
{
48+
SetupEventListeners();
49+
}
4850

4951
private void OnDestroy()
5052
{
51-
// 정리 작업
53+
RemoveEventListeners();
5254
Debug.Log("[LoadingManager] LoadingManager 해제");
5355
}
5456

@@ -59,10 +61,19 @@ private void OnDestroy()
5961
public void StartInitialization()
6062
{
6163
Debug.Log("[LoadingManager] 로딩 시작");
64+
65+
if (GameManager.Instance != null)
66+
{
67+
GameManager.Instance.InitializeGame();
68+
}
69+
else
70+
{
71+
Debug.LogError("[LoadingManager] GameManager가 없습니다.");
72+
}
6273
}
6374

6475
/// <summary>
65-
/// 외부에서 작업 업데이트를 받는 메서드 (간소화된 버전)
76+
/// 작업 업데이트를 받는 메서드 (이벤트 기반)
6677
/// </summary>
6778
/// <param name="taskName">작업 이름 (예: "NETWORK_CONNECTION")</param>
6879
/// <param name="description">작업 설명 (예: "네트워크 연결 중...")</param>
@@ -90,12 +101,71 @@ public async void StartGame()
90101
await _loadingUI.FadeOut();
91102
}
92103

93-
OnInitializationCompleted?.Invoke();
104+
if (GameManager.Instance != null)
105+
{
106+
Debug.Log("[LoadingManager] GameManager를 통해 MainScene으로 전환");
107+
await GameManager.Instance.TransitionToMainSceneAsync();
108+
}
109+
else
110+
{
111+
Debug.LogError("[LoadingManager] GameManager가 없습니다.");
112+
}
94113
}
95114

96115
#endregion
97116

98117
#region Private Methods
118+
119+
private void SetupEventListeners()
120+
{
121+
if (GameManager.Instance != null)
122+
{
123+
GameManager.Instance.OnGameInitialized += OnGameInitialized;
124+
GameManager.Instance.OnInitializationError += OnInitializationError;
125+
126+
// InitializationManager의 진행률 이벤트 구독
127+
var initializationManager = GameManager.Instance.GetComponent<InitializationManager>();
128+
if (initializationManager != null)
129+
{
130+
initializationManager.OnProgressUpdated += OnProgressUpdated;
131+
}
132+
133+
Debug.Log("[LoadingManager] GameManager 이벤트 구독 완료");
134+
}
135+
}
136+
137+
private void RemoveEventListeners()
138+
{
139+
if (GameManager.Instance != null)
140+
{
141+
GameManager.Instance.OnGameInitialized -= OnGameInitialized;
142+
GameManager.Instance.OnInitializationError -= OnInitializationError;
143+
144+
// InitializationManager의 진행률 이벤트 구독 해제
145+
var initializationManager = GameManager.Instance.GetComponent<InitializationManager>();
146+
if (initializationManager != null)
147+
{
148+
initializationManager.OnProgressUpdated -= OnProgressUpdated;
149+
}
150+
}
151+
}
152+
153+
private void OnGameInitialized()
154+
{
155+
Debug.Log("[LoadingManager] 게임 초기화 완료 - 게임 시작");
156+
StartGame();
157+
}
158+
159+
private void OnInitializationError(string error)
160+
{
161+
Debug.LogError($"[LoadingManager] 초기화 오류: {error}");
162+
OnInitializationFailed?.Invoke(error);
163+
}
164+
165+
private void OnProgressUpdated(string taskName, string description, float progress)
166+
{
167+
UpdateTask(taskName, description, progress);
168+
}
99169

100170
#endregion
101171
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /