Message Log / Dynamic Material Error

Can someone help me? I have this blueprint that changes the opacity of a dynamic material, it works as expected but when I exit the play mode, it triggers errors on the message log.

The Message Log displays the following error messages:

Ok, you’re getting that error because your variable ‘Dynamic Material’ isn’t pointing at anything. You need to assign it.

If you have it on tick like that, it’s executing the whole time, every frame.

Maybe you haven’t set the variable yet at the start of play.

Thank you for helping me! I’m still new to Unreal. This is how I am creating the variable on the construction script:

However the I can’t input any DMI on the default value of the material:

About the tick, I’m trying to change the material every time the integer variable is a multiple of 2, is there another way I can try to do this without the tick?

You don’t need the SetMaterial node, because you already assigned the material when you created the instance.

A better way would be to have the integer increment routine in the same BP, then you can check it when you increment it.

Incidentally, if this doesn’t sort it, try clicking on the ‘set scalar parameter value’ in the error log, to check this is actually where the message is coming from :slight_smile:

Thank you! The error disappeared. I created a custom event to fix the tick, and the other issue I somehow managed to fix it by sending the function to my “manager” BP.