How to create a Xenko.Rendering.Material programmatically?


I am trying to create a Xenko.Rendering.Material programmatically. I need to load am image file too as DiffuseTexture.

How can I build it?

Thanks in advance.

1 Like

i think a material is only an object tree, so start with the top level class and fill all properties and options. it should be a 1 to 1 translation from the material properties in game studio…


For the next person who stumbles upon this forum post looking for an answer…

And here is a project sample that runtime loads a wavefront OBJ file, including textures.