# Set Hidden in Game Not Working

**URL:** <https://forums.unrealengine.com/t/set-hidden-in-game-not-working/2318237>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [February 5, 2025, 3:16am UTC](https://forums.unrealengine.com/t/set-hidden-in-game-not-working/2318237 "2025-02-05T03:16:57Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![AmaiTrick](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AmaiTrick](https://forums.unrealengine.com/u/AmaiTrick)\
**Post date:** [February 5, 2025, 3:16am UTC](https://forums.unrealengine.com/t/set-hidden-in-game-not-working/2318237/1 "2025-02-05T03:16:58Z")

</div>

I’ve looked everywhere and can’t seem to find a solution, and I don’t understand what could possibly be wrong. So hoping someone can help me here.

I have an icon that shows over things like pickup-ables and interactable NPCs and such, showing when you get close, going away when you walk away. It works for all of my item actors, such as apples, chests, etc. But I went to set it up (identically!) for the interactable NPCs and suddenly it’s not working, despite being done the same way as the other actors. Is it because it’s a character blueprint? Is there something else I have to do?

Here’s the code I’m using to show and hide it (which works on the other actors):

 ![3f0ee6f2011cc77f32458e8f1bfef144](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/3/5/b35d127e4eef5c06101786f2f4c9bdf6a95ec90e.png)

---

<div class="post-metadata">

**Author:** ![AlienRenders](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlienRenders](https://forums.unrealengine.com/u/AlienRenders)\
**Post date:** [February 5, 2025, 3:35am UTC](https://forums.unrealengine.com/t/set-hidden-in-game-not-working/2318237/2 "2025-02-05T03:35:41Z")

</div>

Collision settings are the same too (both components most have overlap collisions) on your sphere and generate overlap events is checked?

---

<div class="post-metadata">

**Author:** ![AmaiTrick](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AmaiTrick](https://forums.unrealengine.com/u/AmaiTrick)\
**Post date:** [February 5, 2025, 3:37am UTC](https://forums.unrealengine.com/t/set-hidden-in-game-not-working/2318237/3 "2025-02-05T03:37:38Z")

</div>

Overlap all dynamic is set (tried just overlap all, also didn’t work), and generate overlap events is checked. Still not working ☹

---

<div class="post-metadata">

**Author:** ![AlienRenders](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlienRenders](https://forums.unrealengine.com/u/AlienRenders)\
**Post date:** [February 5, 2025, 3:51am UTC](https://forums.unrealengine.com/t/set-hidden-in-game-not-working/2318237/4 "2025-02-05T03:51:07Z")

</div>

You used OverlapAll on BOTH components that are interacting? Asking because OverlapAll is a default preset. It won’t work if the other component uses custom collision settings/presets.

Only other things I can think of that would affect this are:

1. Physical placement of the sphere (too high or too low, make them visible to be sure they are intersecting)
2. One of the components is missing simple collision mesh.

---

<div class="post-metadata">

**Author:** ![AmaiTrick](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AmaiTrick](https://forums.unrealengine.com/u/AmaiTrick)\
**Post date:** [February 5, 2025, 3:54am UTC](https://forums.unrealengine.com/t/set-hidden-in-game-not-working/2318237/5 "2025-02-05T03:54:48Z")

</div>

Overlap All on both still does not work either unfortunately.

Spheres are definitely touching and set up properly, I used debug on starting overlap and leaving overlap to print if its in or out of overlap and it was showing as true/false as if it was working. Looking in the viewport of each, the spheres are large enough and sitting in the middle, they should be fine.

It is definitely overlapping, the code is firing off and setting off the debug command but it won’t actually turn it to ‘visible’ when overlapping.

_edit_

Sorry, to add, they both have a simple collision mesh as it comes with ‘character’ bp by default, so they definitely both have it…

_edit 2_

Starting to wonder if it’s something wrong with the widget. Thought I set it up the same as the other interact widget though… (item interact widget and npc interact widget images are slightly different so I needed 2 widgets)

_edit 3_

Sorry for so many edits I figure its better than re-posting… anyway not an issue with the widget. Copied the widget that was working and replaced the image to make the widget, reset it in the npc bp and still having issues.

---

<div class="post-metadata">

**Author:** ![AmaiTrick](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AmaiTrick](https://forums.unrealengine.com/u/AmaiTrick)\
**Post date:** [February 5, 2025, 5:28am UTC](https://forums.unrealengine.com/t/set-hidden-in-game-not-working/2318237/6 "2025-02-05T05:28:21Z")

</div>

Okay I felt this needed a post instead of an edit;

In frustration I created a copy of one of my actor BPs with a working hide/show widget when getting close/leaving collision. Got rid of the mesh so it was just the widget, but kept everything else and set it on top of the NPC (removing the NPC’s sphere collision just in case). Essentially I made the simple actor bp the interaction instead.

Forgot to uncheck ‘visible’ and it started visible (as expected), and would hide/reappear properly no issue! Just like the bp it was a copy of.

Unchecked ‘visible’ to hide it by default and suddenly it won’t work anymore despite this being a copy of a functioning actor doing the _exact_ same thing as this one.

I’m wondering if this is a bug now!

_Edit_

So I tried leaving it set to ‘visible’ by default, and hiding it with the same command on ‘begin play’. But it does not hide it at all, it is visible, and if I get close and leave again it disappears meaning the code is working. But it _starts_ as visible and _will not hide_ with the code regardless of what I do.

_Edit 2_

If I set ‘hidden in game’ as true AND ‘visible’ to true, then use begin play \> set hidden in game to true, it works properly (hidden from the start, visible when I get close) ONLY for the actor I copied from the other working actor. If I copy this all onto the NPC, it does not hide at the start of play.

---

<div class="post-metadata">

**Author:** ![DomusLudus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/domusludus/32/1215140_2.png) [@DomusLudus](https://forums.unrealengine.com/u/DomusLudus)\
**Post date:** [February 5, 2025, 8:40am UTC](https://forums.unrealengine.com/t/set-hidden-in-game-not-working/2318237/7 "2025-02-05T08:40:54Z")

</div>

Visible should always be active, it is only used for the editor. you just have to use “hidden in game”  
are you sure geting correct reference?  
Can you show the hierarchy in the actor?  
By the way, wouldn’t it be better if you used the visibility of the widget and not that of the object that contains it

---

<div class="post-metadata">

**Author:** ![AmaiTrick](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AmaiTrick](https://forums.unrealengine.com/u/AmaiTrick)\
**Post date:** [February 5, 2025, 7:33pm UTC](https://forums.unrealengine.com/t/set-hidden-in-game-not-working/2318237/8 "2025-02-05T19:33:58Z")

</div>

Sorry for the late reply, was asleep!

Wasn’t aware about visible being editor only tutorials gave me a different impression (I was taught to hide it and use the code to change visibility. Great tutorial if it’s teaching me wrong! D:)

Anyway, even with visible set to true, the ‘set hidden’ is not working when used to hide it at the start of play, only when overlapping (Unless it’s not a character bp, then it works for some reason). If it’s a character bp that’s when it refuses to hide at the start of play. With ‘visible’ set to true, I can get it hiding and reappearing when overlapping finally but I cannot get it to hide at start of play so it is always visible until the player overlaps it for the first time.

Here’s the NPC actor hierarchy:

 ![892507f7c44ddd349824c703c773bdf3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/4/b/24b757e3c6cb7dd5e251e6e62cfed34e2a035c76.png)

I’m not sure how I could be getting wrong references given all references are inside the NPC actor BP and I’m dragging off the hierarchy (or click on them and typing the ‘begin overlap’ etc. so it grabs the reference to the sphere inside the actor and all that). I’ve re-grabbed from the list repeatedly to make sure I was referencing the right things, like I’m 100% sure the widget I’m referencing is in fact the one in the actor I’m trying to hide, given it _does_ hide and show if I get near. It just won’t hide using ‘begin play’ now.

> By the way, wouldn’t it be better if you used the visibility of the widget and not that of the object that contains it

I’m still fairly new so I’m not quite sure what the difference is here… sorry!

_Edit_  
Just adding the two images of the code that’s working and code that’s not working:

Code that is WORKING inside a regular actor bp (excuse the branch, need it to not show if a quest isn’t active)

 ![9bae3c62b4f6de4a409c6874b726865a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/f/d/dfd6697084fd29a4cb88114ed1b0c88a5c44519b.png)

Code that is NOT working inside a ‘character’ bp (note: the hide and show on overlap IS working now, it’s the begin play that is not)

 ![bf9a9574e8da956da18c1919a9f402da](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/5/1/b511a9e5915515928f79b8d98a22bbe8e93a0acb.png)

_Edit 2_

So messing around I found out the working code on the normal actor does not even need event begin play to hide it, as it has ‘hidden in game’ checked by default and actually does start hidden regardless, works no problem. But despite the same things set up on the npc ‘character’ bp, it will _not_ hide the widget by default no matter what I do.

---

<div class="post-metadata">

**Author:** ![DomusLudus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/domusludus/32/1215140_2.png) [@DomusLudus](https://forums.unrealengine.com/u/DomusLudus)\
**Post date:** [February 6, 2025, 8:32am UTC](https://forums.unrealengine.com/t/set-hidden-in-game-not-working/2318237/9 "2025-02-06T08:32:01Z")

</div>

Maybe it’s not that, but you have the things inside the mesh and not the capsule. I’m making this up, but maybe the C++ code calls unhiden everything when the game starts. But hey, you shouldn’t worry too much, it’s not that weird to call hidden at begin play

By the way, if it’s a simple icon, wouldn’t it be better to use a bildboard?

---

<div class="post-metadata">

**Author:** ![AmaiTrick](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AmaiTrick](https://forums.unrealengine.com/u/AmaiTrick)\
**Post date:** [February 6, 2025, 10:32pm UTC](https://forums.unrealengine.com/t/set-hidden-in-game-not-working/2318237/10 "2025-02-06T22:32:13Z")

</div>

I’ve always found widgets for icons like this a lot easier to work with than billboards from experience… in the long run it’s probably better but I prefer widgets for now 😛

Unfortunately it’s refusing to hide at the start of play regardless, so for now I’ve created a regular actor with just the widget, raised it high enough to be above the head when placed below it and used that to make a temporary icon for it. Dumb work around but it works at least.

For future readers; seems to be an issue with either just my character blueprint or character blueprints in general. Getting it to hide and appear works so long as ‘visible’ is checked, but if you’re working in a character blueprint it may not hide itself automatically. Make sure ‘hidden in game’ is checked and it may actually work for you. Otherwise, no solution has been found… sadly.
