i’m trying to save some vector parameter value from every dynamic material in my scene so for that i have no problem but my issue is when i try to apply this value when i close and restart the scene with a save object.
Currently the things that i don’t understand is like my reload function (so take back the information of the parameter value in my save object) is not working at the start of the game, but if with a custom event i set a parameter value and next to this i launch my reload that’s work.
An other information is in my reload function i print the element parameter info name at start and there are not printed.
This is like i need to interact with the material instance to use my function.
I’d recommend making the code REALLY SIMPLE to start with. Just save one param on one material, then expand from there. You don’t want to be troubleshooting both systems at the same time.
You only need to create the save game object once. You’re creating it every time you do a save, which will means that anything saved previously is erased.
You’re also saving based on object name. I think that could be pretty unreliable, and possibly doesn’t work in a packaged game.
Apart from that, the code is too convoluted to follow.
I achieve to to a savegame and load with the position of my object, i understand how that work but i can’t figure how to do this easily for dynamic matierial instance that change in runtime save the last configuration of this material and load it the next time.
The problem was that the parameters of material instance dynamic was not available and return empty at start of the game cause i needed to first create a material instance on my content browser and activate the parameter then create a dynamic material in my bluperint from the base of this material instance that i create before.
I don’t know if it’s a bug or somethings else but i found that few other people encounter the same issue.