Visibility Bool somehow true and false


Hello, I have a bit of a conundrum that I have been trying to figure out for days now. I have a blueprint with a nested child bp component inside for the wires you see. In my construction script, I am automatically “connecting” the wires to the nodes that you see. Within the wire blueprint I have a static mesh representing the disconnected wire, and a spline mesh representing the connected one. I set the visibility of both based on whether or not the wire is connected. This function is below.

Somehow, someway, both meshes end up invisible on about 1 out of 5 compilations. The text render on the left was specifically added to track whether or not the wire has a connection, and this bug happens on wires that are connected OR disconnected; it doesn’t discriminate. Both objects (the static mesh and the spline) are visible by default. I feel like I’m at the end of my rope on this. Can anyone tell me why this might be happening?

Hello @Ordua

Have you tried moving the logic from Construction Script to say Begin Play? If Wire Connected (boolean) is set in construction script, that might be the problem, especially with nested child blueprints.

1 Like

I have been at this for almost a week, banging my head against a wall trying to figure out why this was happening, but I’ll be damned because this worked! I’m keeping the connection logic inside the construction script, but moving the visibility logic to the wire’s begin play shows the invisible wire exactly how it’s supposed to appear once I’m actually playing the level.
Thank you so much! You’ve prevented my insanity!

1 Like

Awesome! Happy I could help. :blush:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.