LYN-5843. Fixed an issue when exit from full screen game mode in Editor. (#6098)

* LYN-5843. Fixed an issue when exit from full screen game mode.

Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com>
This commit is contained in:
Qing Tao
2021-12-02 15:38:24 -08:00
committed by GitHub
parent 4d5aad13d1
commit f56bbb96b0
@@ -146,11 +146,17 @@ namespace AtomToolsFramework
if (auto existingScene = scene->FindSubsystem<AZ::RPI::ScenePtr>())
{
m_viewportContext->SetRenderScene(*existingScene);
if (auto auxGeomFP = existingScene->get()->GetFeatureProcessor<AZ::RPI::AuxGeomFeatureProcessorInterface>())
// If we have a render pipeline, use it and ensure an AuxGeom feature processor is installed.
// Otherwise, fall through and ensure a render pipeline is installed for this scene.
if (m_viewportContext->GetCurrentPipeline())
{
m_auxGeom = auxGeomFP->GetOrCreateDrawQueueForView(m_defaultCamera.get());
if (auto auxGeomFP = existingScene->get()->GetFeatureProcessor<AZ::RPI::AuxGeomFeatureProcessorInterface>())
{
m_auxGeom = auxGeomFP->GetOrCreateDrawQueueForView(m_defaultCamera.get());
}
return;
}
return;
}
AZ::RPI::ScenePtr atomScene;