Przeglądaj źródła

AssetProcessorBatch Reflect Fix (#18528)

* fix for AP Batch not reflecting the PlatformConfiguration.
* nullptr init

Signed-off-by: Lloyd T <[email protected]>
Lloyd T 7 miesięcy temu
rodzic
commit
a14341a771

+ 6 - 0
Code/Tools/AssetProcessor/native/utilities/BatchApplicationManager.cpp

@@ -83,6 +83,12 @@ void BatchApplicationManager::OnErrorMessage([[maybe_unused]] const char* error)
 void BatchApplicationManager::Reflect()
 {
     ApplicationManagerBase::Reflect();
+
+    AZ::SerializeContext* context = nullptr;
+    AZ::ComponentApplicationBus::BroadcastResult(context, &AZ::ComponentApplicationBus::Events::GetSerializeContext);
+    AZ_Assert(context, "No serialize context");
+
+    AssetProcessor::PlatformConfiguration::Reflect(context);
 }
 
 const char* BatchApplicationManager::GetLogBaseName()

+ 1 - 1
Code/Tools/AssetProcessor/native/utilities/GUIApplicationManager.cpp

@@ -764,7 +764,7 @@ void GUIApplicationManager::Reflect()
 {
     ApplicationManagerBase::Reflect();
 
-    AZ::SerializeContext* context;
+    AZ::SerializeContext* context = nullptr;
     AZ::ComponentApplicationBus::BroadcastResult(context, &AZ::ComponentApplicationBus::Events::GetSerializeContext);
     AZ_Assert(context, "No serialize context");