Creating Dynamic Material in Construct Script crashes engine at reload

I cannot create Dynamic Material Instance for Text Render Component in my Actor’s Construction Script because it crashes engine when I try to reload the level with the Actor inside.
I can load the level properly for the first time, but engine crashes every time when I want to open it again (via editor).

In [engine log][1] I found an error referring to Material Instance Dynamic for my Component.

Is it safe to create Dynamic Materials in Construction Script?

1 Like

Hello Koralgoll,

I was able to reproduce this issue on our end. It appears that this is a known issue and that it has been submitted to the developers for further consideration. I have provided a link to the public tracker. Please feel free to use the link provided for future updates. Thank you for your time and information.

Link: Unreal Engine Issues and Bug Tracker (UE-29640)

Make it a great day

This is still an issue in BP.

If a material (e.g., DefaultTextMaterial) is assigned to an object material element and then, with “Construction Script” a dynamic material instance of the same material (DefaultTextMaterial) is created and assigned to the mesh again, the editor crashes.

But I have found a solution: First use the default material, e.g., DefaultTextMaterial or BasicShapeMaterial in my case, then create a dynamic material instance of not the same material, e.g., MI_MPR-COR in my case and assign it to the mesh (see figure).