C++ Set Material of Landscape

Pretty much the same as the title, how can I set the material of a landscape actor during runtime with c++? It seems that landscape objects are not well documented and I cannot find anything that will help me.

Alternatively, is it possible to create a dynamic material instance for a landscape?

Your best bet is to use a material parameter collection which will allow you to manipulate the properties of your landscape material at run-time without actually creating an instanced material of the landscape (which is not possible at the moment). Create the landscape material with as many parameters as you need, use the various material blend nodes to represent as many different materials as you want to. Lerp between these materials as necessary using scalar parameters piped in through your material parameter collection asset (which you’ll modify at run-time).

Follow this thread for a detailed discussion of the current limitations around landscapes:

In short, the landscape modules are largely “Editor only” and outside of parameter collections there is little to nothing you can do with them at run-time in their present form.