-
is there anything else in the project that interacts with the scope widget - is it accessed elsewhere, beyond this graph?
-
does this pawn ever die - gets destroyed? That’d be one way to replicate it:
- press key → create widget
- pawn gets destroyed
- an orphaned widget now lives in the viewport
- spawn a new pawn (we keep holding the key, it was never released)
- release key in a new pawn → the variable is null

On the other hand, you do check validity in the second screenshot…
It’s a bit puzzling, indeed.
- do we load levels?
- do we ever call
Remove All Widgets?
Grasping at straws. ![]()
An alternative here is to create the widget on Begin Play, once. And then the input shows / hides it instead rather than constructs it from scratch.
If you do stick with the create / remove, consider clearing that reference after removing the scope from parent:
If you do not, that stale widget you’re not going to use anyway (since you create brand new ones every time a key goes down) will reside in the memory. The pawn referencing it prevents Garbage Collection from handling it. If you keep spamming the key, you’ll end up with many widgets tucked away until GC eventually scoops them all.
This is somewhat irrelevant here but good practice for when things get so complex that debugging becomes a living nightmare. ![]()
