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.
0
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.
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.
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.