MCPcopy Create free account
hub / github.com/Illation/ETEngine / UnloadScene

Method UnloadScene

Engine/source/EtFramework/SceneGraph/UnifiedScene.cpp:180–204  ·  view source on GitHub ↗

--------------------------- UnifiedScene::UnloadScene

Source from the content-addressed store, hash-verified

178// UnifiedScene::UnloadScene
179//
180void UnifiedScene::UnloadScene()
181{
182 // notification first
183 m_EventDispatcher.Notify(E_SceneEvent::Deactivated, new SceneEventData(this));
184
185 // clear
186 m_Scene.RemoveAllEntities();
187
188 // reset rendering
189 m_RenderScene.SetSkyboxMap(core::HashString());
190 m_RenderScene.SetStarfield(core::HashString());
191 m_RenderScene.SetPostProcessingSettings(render::PostProcessingSettings());
192
193 // reset physics
194 m_PhysicsWorld.Deinit();
195
196 // reset time
197 core::ContextManager::GetInstance()->SetActiveContext(nullptr);
198
199 // invalidate state
200 m_ActiveCamera = INVALID_ENTITY_ID;
201 m_AudioListener = INVALID_ENTITY_ID;
202
203 m_CurrentScene.Reset();
204}
205
206//-------------------------
207// UnifiedScene::AddEntity

Callers 1

~AbstractFrameworkMethod · 0.80

Calls 9

HashStringClass · 0.85
RemoveAllEntitiesMethod · 0.80
SetSkyboxMapMethod · 0.80
SetStarfieldMethod · 0.80
SetActiveContextMethod · 0.80
DeinitMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected