------------------------------------ SceneViewport::InitCamera
| 272 | // SceneViewport::InitCamera |
| 273 | // |
| 274 | void SceneViewport::InitCamera() |
| 275 | { |
| 276 | fw::EcsController& ecs = fw::UnifiedScene::Instance().GetEcs(); |
| 277 | fw::T_EntityId const camEnt = fw::UnifiedScene::Instance().GetActiveCamera(); |
| 278 | |
| 279 | EditorCameraComponent edCamComp; |
| 280 | edCamComp.renderCamera = &m_SceneRenderer->GetCamera(); |
| 281 | m_Camera = ecs.DuplicateEntity(camEnt, edCamComp); |
| 282 | |
| 283 | if (ecs.HasComponent<fw::AudioListenerComponent>(camEnt)) |
| 284 | { |
| 285 | ecs.RemoveComponents<fw::AudioListenerComponent>(camEnt); |
| 286 | } |
| 287 | |
| 288 | if (ecs.HasComponent<fw::ActiveAudioListenerComponent>(camEnt)) |
| 289 | { |
| 290 | ecs.RemoveComponents<fw::ActiveAudioListenerComponent>(camEnt); |
| 291 | } |
| 292 | } |
| 293 | |
| 294 | |
| 295 | } // namespace edit |
nothing calls this directly
no test coverage detected