MID TextureCollections don't work with Post Process Overlays

I found an issue when using a TextureCollectionParameter in a material that was assigned to a Post Process Overlay. I had some code that was creating a MID for the material in question and it was overriding the TextureCollection. I was never seeing this texture collection properly in the overlay, only the default TextureCollection.

I tracked this down to Engine\Source\Runtime\Engine\Private\Materials\MaterialInstanceDynamic.cpp in the function:

void UMaterialInstanceDynamic::CopyInterpParameters(UMaterialInstance* Source)

{

…

}

I added the code shown below to fix this up. I just wanted to mention it since it was an easy fix.

for (auto& it : Source->TextureCollectionParameterValues)
{
	SetTextureCollectionParameterValue(it.ParameterInfo.Name, it.ParameterValue);
}

[Attachment Removed]

Hi,

Thanks for providing this fix! I’ve created the following issue which should be visible publicly soon for tracking: https://issues.unrealengine.com/issue/UE\-393451

[Attachment Removed]