On Exit Editor Shows Static Mesh Assets' Materials are Modified when Using Instancing

Hi,

I’ve noticed that if I load a UStaticMeshComponent with C++ and add it to a level as part of an UInstancedStaticMeshComponent that the editor shows the UMaterial as modified on exit. If I just add the UStaticMeshComponent directly from C++ without instancing nothing shows as modified.

I noticed that if I call ClearInstances() on the assets don’t show as modified on exit.

Is this a bug or am I using instancing incorrectly and need to call ClearInstances() manually? Are there recommended or required places to call it?

Thanks!

I figured it out. Apparently the materials didn’t have the flag set to work with instanced static meshes so the engine was setting it automatically. Very convenient. Now that they have been modified properly the problem doesn’t show up anymore. It was a bit concerning not knowing why materials were being modified as the specific properties weren’t highlighted anywhere.