My blueprint works pretty fine, but in Message Log I’m getting a lot of errors about it.
How can I make these errors not appear/ignore? Because my blueprint works fine.
But I need to set the variable to NONE every time I release Mouse1, when I place isValid nodes it goes NotValid.
That’s really not the best approach. These errors are not just wornings, like what you would have for overlapping UV’s and stuff, there are full fledged errors that may cause crashes whan you launch a game not in the editor. So I strongly suggest to find out why they happen and eliminate the cause. Just insert a few Is Valid checks in places the errors lead you to, I believe that would suffice.
If you have to compare an actor (or mesh) to Null (None), you just check if it’s valid. If you want to set it to Null, I believe you can simply leave the New Mesh pin empty.
I left the NewMesh pin empty and placed isValid node instead of compare as you said.
It works but I’m still having that errors.
I solved it.
Instead of setting the mesh to Null/None I created a new static mesh called it “Nulll” and used it as a Null mesh. Then I added an isValid node to check it if it’s valid and a branch to see if it’s already sat to Nulll or not before setting the mesh to Nulll.
Solution:
Thanks for your help.
So many years later, but for the record, it looks to me like the bug is that you’re doing Is Valid on the Static Mesh that belongs to Hit Component 1. You should be doing Is Valid on the Hit Component 1 itself before assuming that it has a Static Mesh.