Download

How to error check set value on a material parameter collection?

This works great when I do Play In Editor, but has no visible effect when I do Play Standalone Game:

What can I do to find the potential error that caused this?

(The nodes immediately before these still execute!)

Made a question on answerhub too, but no suggestions there either:

https://answers.unrealengine.com/questions/962926/view.html

There really are only these three nodes interacting with this material in my entire project:

Capture.PNG

Ugh… apparently it was as simple as attempting to set the parameter too fast after a level had/was loading. :frowning:

Odd but possible.
The other possibility is an Id10T error like the one I just had where you hooked the stuff up to the construction script and expect it to only change at runtime…

If you are doing this within the Game Mode the timing thing makes sense.
you should probably move it to the level or the actual blueprint that creates it in order to avoid issues.

Loading times vary drastically so a delay node won’t help. You would have to somehow check that the item in question is loaded beforehand… or not use the game mode.

This I know. As you say, I need to figure out where to put it as I want to have one value in the editor, one depending on what level is currently playing, and one value depending on an in-game item.

What confused me is that I thought because a material parameter collection is basically just a container for some data it would always be loaded in memory regardless of whether anything was using it or not (or at least that my changes would be written to disk, but I see why that wouldn’t happen), but it’s apparently only loaded when an object uses that material. Quite obvious in hindsight, but the editor behavior tricked me.