I just replicated part of this on a fresh “First person” game.
Create a new Blueprint class called “Test1” and a new Widget class called “Text”.
In “Text” delete the canvas and add a “Text” element.
In “Test1” add a static mesh component, make it the default root node and assign it to the 1M_Cube mesh. Then add a Widget and make it screen space and a widget class of the “Text” widget you just made.
Drag an instance of the “Test1” BP in to the level and add the following to the level blueprint.
Now hit play.
Press “E” once and the cube is hidden but the text remains on the screen. Press “E” again and the cube is shown along with the text.
Edit : Please read my last comment, the following was all my fault!
I then went on to try to replicate the second part of the bug (Calls to SetHiddenInGame directly to the widget component allow it to be hidden but it cannot be shown again once hidden) but I could not.
This level blueprint will hide and show the text as expected. (But surely hiding the Actor should do this by default?)
I wondered if the second part of the bug is caused by me using a child blueprint class.
I created a “Test1_Child” blueprint child of the parent to test this theory and dragged it in to the level, duplicated the level blueprint and could still not replicate the behavior I mentioned from my project.
Turns out after looking at my project I was doing this… But doing this in the clean project it does not even hide the “Text”. Maybe I am doing it wrong?
In all the examples I have provided the “Widget Component” is always a child of the “Static Mesh” within the blueprints I have made and the “Static Mesh” is always the root node of the blueprint.
In my own project the text was not showing again since I am working on a multiplayer game and it was not firing the “Set Hidden In Game” to show the text on the client after it had been hidden, it was only executing on the server!!
Hence I could not replicate it in a fresh project!
But I still think that showing / hiding the widget components should be included within the “Set Actor Hidden In Game” unless it is not by design for some reason?
I tried this in 4.11 and was unable to reproduce this result on our end. Could you provide the sample project that you are using so that I can get a closer look at your issue?
I was able to reproduce this issue on our end. I have written up a report (UE-26114) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your time and information.
Workaround: You can get a reference to the widget component and you can set it to hidden in game directly
Do you know when/if this bug is about to be fixed? I have a lot of screen space widgets in my project, and it’s extremely annoying that they won’t be affected by the “Actor Hidden In Game” function. Sure, you can work around it, but it’s quite frustrating and time-consuming.