Blueprint cast node causes actor to disappear in Standalone but not Play In Editor

I’ve been having some strange behavior with my blueprint classes lately (seeanswers.unrealengine.com/questions/25200/differences-in-behavior-between-pie-and-standalone.html), but I’ve narrowed it down a little bit to a more specific situation involving my pawn. In the below example, from my pawn’s EventGraph, everything works as expected in Play In Editor. I see the text whenever my pawn overlaps another actor. If I run Standalone Game, though, my pawn is seemingly nonexistent (or, at least, invisible and not colliding with anything).

I then found that if I break the link before the Cast to BF_GenericMover node, my pawn works as expected in Play and Editor and Standalone Game.

I have been having problems in all of my blueprints that I do casting in. My one blueprint compiles fine and works in editor, but in the standalone game it just sits there and executes nothing. It’s definitely a bug.

Hi ,

Have you made sure that your pawn and gamemode have been set as the default for your project? Further, for a standalone game make sure that in the world settings panel the gamemode and pawn are set for your individual level as well. Let me know if this fixes the issue. Thank you!

Thanks for getting back to me. My pawn and gamemode have been set as the default for my project, but the World Settings had “None” selected for GameMode. Unfortunately, setting that to my gamemode has no noticeable affect, and my pawn seems to still be missing in Standalone if that Cast node executes.

Hi ,

Do you have any test assets that you would be comfortable sharing? We could have a look and see what might be occurring.

Sure, here’s a project where I’ve stripped things out to a minimum that still demonstrates some of the strange editor-versus-standalone issues I’m having:

Dropbox - Error - Simplify your life.

In this, everything works as expected when playing in editor: the player can move side-to-side with A and D and fire straight ahead with the left mouse button while cones randomly spawn and move toward the player. The cones explode when shot and the player can collide with and bounce off of them. In standalone mode, however, no cones appear. I’ve noticed that various classes (mostly the player pawn and any children of BFGenericMover), all of which do some sort of blueprint casting, will confusingly start disappearing or start showing again as my project has changed.

Hi ,

Have you been able to reproduce this effect in a clean project or is this limited to your project?

Yes, today I was able to reproduce it in a new clean project. I rebuilt my pawn, controller, game mode, and the moving cone obstacle, and I have the same issue.

Here’s the further-simplified rebuilt project:

Dropbox - Error - Simplify your life.

With this, everything works in Play In Editor, yet my controller doesn’t function and the cones (TestObstacle) don’t appear in Standalone.

I’ve found that removing the uncalled bouncebackState function (which does nothing but a simple Get Player Pawn > Cast To BFPlayerPawn > access a boolean of my pawn) will allow my controller to function in Standalone, and removing a similar cast in my “BFGenericMover” class (of which the cone obstacle is a child) allows the cones to spawn in Standalone.

Hi ,

Unfortunately I was not able to reproduce this bug on my end outside of your project. I have attached my findings and this conversation to a bug report to be assessed. Thank you and have a great day!