Game behaving differently in standalone mode

When running my game in Viewport, my GUI is visible, I have input control, and can hear audio. All of these things are tied to a blueprint. However, when I run my game standalone, something is causing this blueprint to not work correctly.


When running my game in Viewport, my GUI is visible, I have input control, and can hear audio.

alt text

When I run in Standalone, My GUI is not visible at all, I have no input control, and cannot hear any audio.

I have narrowed down what is causing it but can’t fix it.

I have a 2 variables, LeftLaser and RightLaser, which are both types of Laser. Laser is a base class, which has subclasses Red_Laser and Blue_Laser.

As a default value I set LeftLaser to the class Blue_Laser. Then, in my shoot script, I call SpawnActor, and pass it my LeftLaser class.

Again, everything works fine in viewport, but nothing works in standalone.

Any ideas?

Hi Jmathieu,

Have you made sure that your Gamemode, HUD, Player Controller, and Pawn are all set in both your world settings and project settings? If you only have them set in the project settings when you do standalone the data does not transfer properly.

I believe so. Another interesting part of this is that when I first load the project, my blueprint will not compile. I get the following error.

I also put in there my LeftLaser class type, which you can see is a subclass of Laser.

Any other ideas?


I have found a work-around. I have to cast the return value of SpawnActor to laser, as seen here:

Again, this issue only occurs when running the game standalone. With PIE, the game works fine without having to perform the cast.

Hi Jmathieu,

After looking at the full setup I would have recommended using a cast to, actually! The reason it was failing is because it technically did not inherently know where the data was coming from, so using a cast to allowed it to be more specific to find the data you were looking for. This is the workflow I would recommend using in the future.

Thanks, I appreciate the information!