Hello there!
I have been trying for several days to apply a ground color texture to a landscape at runtime (in the editor, not in game) with c++.
I use height data loaded for HTTP servers and spawn a landscape actor, the heightmap works with no problems.
I can also apply a material at runtime. This is all done in the click of a button in the details panel.
But if I create a dynamic instance of the material, assign the texture (also created at runtime), and apply it to the material, it doesn’t update. I can see in the details panel of the Landscape that the instance has been correctly created, with the right texture, but the landscape still has the default texture. I tried enabling DynamicMaterialInstance, using SetLandscapeMaterialTextureParameterValue, PostEditChangeProperty, UpdateAllComponentMaterialInstances, MarkComponentsRenderStateDirty, and many more.
Has anyone already done this? I have a feeling I’m missing something crucial, because it shouldn’t be that hard
I have not upload code snippets because I tried a lot of different methods and none of them worked.
Thanks.