Hi all
I have an issue when my “Cast to Third Person” (promoted to a variable) becomes invalid after about 4min30s (losing all references I am calling)
I am accessing variables saved in my third person blueprint for a menu system (sound volumes, graphics settings) to display and interact with them in the menu. It is responding
like I have called destroy actor on the variable (even though there is no call to destroy actor)
I tried to call IsValid - false and create it again but if I cast it again it doesn’t create it again.
I get a “pending kill or garbage” error message when I leave the simulation.
I am guessing this is where the issue is occurring, if I call it as my player during gameplay it works as expected (can stay on the pause screen for infinite time without losing the cast).
When it is from the MainMenu level, I can leave it on the screen with the volume controls and it will lose the numbers at the same time (4m30s) They disappear from the screen
The widget is added to the viewport in the level blueprint (it is a blank level called “MainMenu”)
Do you ever load another level?
You’re adding the widget to the viewport but do not set a reference. Which could be fine under regular but here we might be dealing with something uncanny. Perhaps that could help.
The level running in viewport (left monitor/view) with the level blueprint on the right.
After it has been running for the 4m30s the displayed number in the widget (number 5 in this example) disappears unless the blueprint has the “Set Game Paused” set to TRUE.
Yeah, that does not seem right. I wonder if that’s a UE5 thing / bug - seems like it now. That bound function fires non-stop, every frame - the cast node can’t expire.
the displayed number in the widget (number 5 in this example) disappears
Out of sheer curiosity, is it the entire widget that goes missing or the text disappears because the variable cannot be accessed? Like, if you had a border - would it also go missing?
One note, hear me out - it’s a wild theory! There is something called killZ - if the character falls out of the world, that actor gets destroyed. What are the chances that your character simply keeps falling and gets killed by the killZ volume?
Put a platform under their feet, see what happens.
This may be completely irrelevant but it would explain nicely why pausing works…
That is what it is, I added a box for the player to spawn on to and it works. If I make the player jump off the box it causes the loss of the cast. It was only the number from the cast being lost. Any border, buttons, images remain on the screen.