I’m doing one system for a skeletal mesh switch using widget buttons. In this system I have one blueprint containing the first skeletal mesh and a widget blueprint.
The meshes should switch using a function with a variable like this:
I was digging into the forums and the possible solutions I’ve found is to add a “Is Valid” node to check the variable and mesh., but I’m not sure how to do it properly.
I’m new to blueprint and would be grateful to have some assistance and advice on this!
You can use “Is Vaild” by placing it right after Mesh Switch. The “input object” should be your Character variable and then after the “Is Valid” execute pin you can print a string saying something like that it is valid, and the plug it into the Set Skeletal mesh Asset. The “Is not Valid” should print something that says that it is not valid.
When you test it, do you play it or are you testing in the editor? Becasue I think you need to cast inside the “Event begin play” and not “Event Construct” if you are going to use it in play mode and not editor.
Thank you for you reply!
I did create one Is valid node and the print strings. It returned to me not valid. It still access none trying to read the variable.
The function graph is looking like this now
I’m playing it and can’t add one Event BeginPlay in the widget graph.
Just for reference, I did exactly what this guy did in this video. If you jump to minute 3:44, that’s the part where he created the variable and the function.