Edit comment and add marker for version update.
Signed-off-by: Robin <rbarrand@amazon.com>
This commit is contained in:
@@ -44,7 +44,7 @@ namespace AZ
|
||||
if (auto* serialize = azrtti_cast<SerializeContext*>(context))
|
||||
{
|
||||
serialize->Class<MaterialAssetDependenciesComponent, Component>()
|
||||
->Version(5)
|
||||
->Version(5) // Set materialtype dependency to OrderOnce
|
||||
->Attribute(Edit::Attributes::SystemComponentTags, AZStd::vector<Crc32>({ AssetBuilderSDK::ComponentTags::AssetBuilder }));
|
||||
}
|
||||
}
|
||||
@@ -88,8 +88,11 @@ namespace AZ
|
||||
jobDependency.m_sourceFile = materialTypeSource;
|
||||
jobDependency.m_platformIdentifier = platformIdentifier;
|
||||
|
||||
// If includeMaterialPropertyNames is true, then we need materials to depend on materialtype only once in order to get
|
||||
// the property names. After the initial processing, materials will no longer be dependent on materialtype files.
|
||||
// If includeMaterialPropertyNames is false, then a job dependency is needed so the material builder can validate
|
||||
// MaterialAsset properties against the MaterialTypeAsset at asset build time. If includeMaterialPropertyNames is true, the
|
||||
// material properties will be validated at runtime when the material is loaded, so the job dependency is needed only for
|
||||
// first-time processing to set up the initial MaterialAsset. This speeds up AP processing time when a materialtype file is
|
||||
// edited (e.g. 10s when editing StandardPBR.materialtype on AtomTest project from 45s).
|
||||
bool includeMaterialPropertyNames = true;
|
||||
RPI::MaterialConverterBus::BroadcastResult(includeMaterialPropertyNames, &RPI::MaterialConverterBus::Events::ShouldIncludeMaterialPropertyNames);
|
||||
jobDependency.m_type = includeMaterialPropertyNames ? AssetBuilderSDK::JobDependencyType::OrderOnce : AssetBuilderSDK::JobDependencyType::Order;
|
||||
|
||||
Reference in New Issue
Block a user