How do I save a Material of an actor at runtime & Load it

I can save a material at runtime but it doesn’t work when I load it… If you know, how to fix this issue please answer the question…

Also, its not because I forgot to call the function on begin play

Can you show your save and load code?

You can save asset path and material parameters (if You have a dynamic material instance). During loading You can load material by path and set it into a mesh

This screenshots might help you understand better:

Please look at the screenshot above!

So, I’m just noticing you’re not using the save game param?

347121-screenshot-1.jpg

and in the load, you’re not reading the save game. Is that happening somewhere else?

Those are both the same game references, and I tried it but it still not letting me loading the materials. I can save its location, rotation, and scale but saving materials doesn’t work!

Ah, you’re saving actor references, I’m pretty sure that doesn’t work.

You can give all the actors a tag or an ID and save that. When you reload, you then know which is which.