瀏覽代碼

Scene reset and multiscene fixes

Fixes the multi-scene example component using the wrong name for requesting the reflection probe feature processor. Also fixes ResetScene() so it actually gets the new scene instead of holding onto a possibly stale pointer.

Signed-off-by: Ken Pruiksma <[email protected]>
Ken Pruiksma 3 年之前
父節點
當前提交
5811bb7fbb
共有 2 個文件被更改,包括 2 次插入1 次删除
  1. 1 0
      Gem/Code/Source/CommonSampleComponentBase.cpp
  2. 1 1
      Gem/Code/Source/MultiSceneExampleComponent.cpp

+ 1 - 0
Gem/Code/Source/CommonSampleComponentBase.cpp

@@ -307,6 +307,7 @@ namespace AtomSampleViewer
     void CommonSampleComponentBase::ResetScene()
     {
         m_meshFeatureProcessor = nullptr;
+        m_scene = RPI::RPISystemInterface::Get()->GetSceneByName(AZ::Name("RPI"));
     }
 
 } // namespace AtomSampleViewer

+ 1 - 1
Gem/Code/Source/MultiSceneExampleComponent.cpp

@@ -82,7 +82,7 @@ namespace AtomSampleViewer
         sceneDesc.m_featureProcessorNames.push_back("AZ::Render::PointLightFeatureProcessor");
         sceneDesc.m_featureProcessorNames.push_back("AZ::Render::PostProcessFeatureProcessor");
         sceneDesc.m_featureProcessorNames.push_back("AZ::Render::QuadLightFeatureProcessor");
-        sceneDesc.m_featureProcessorNames.push_back("ReflectionProbeFeatureProcessor");
+        sceneDesc.m_featureProcessorNames.push_back("AZ::Render::ReflectionProbeFeatureProcessor");
         sceneDesc.m_featureProcessorNames.push_back("AZ::Render::SkyBoxFeatureProcessor");
         sceneDesc.m_featureProcessorNames.push_back("AZ::Render::TransformServiceFeatureProcessor");
         sceneDesc.m_featureProcessorNames.push_back("AZ::Render::ProjectedShadowFeatureProcessor");