Download

Different BP Behaviors when playing a packaged game

Hey folks,
today I looked into packaging a game and noticed two odd blueprint behaviors (dealing with them lead to a lot of frustration), and I am not quite sure whether I should credit my own incompetence or UE4 bugs. Maybe you can help solve some of the mysteries, or I can at least share my experience (and solutions) with people who might have similar problems. Here goes!

First issue: Input
The first issue was a quite annoying one: there was no input in the packaged version. The most I could do was click UMG buttons, but anything apart from that did not work. After hours of looking into it I finally figured out that having the movement/input actions (e.g. character jump, axis input etc.) in the PlayerCharacter BP does work in the editor, but it does not in the packaged game. After moving all input related stuff to the PlayerController BP everything worked like a charm.

So did I just miss an option which should have been set (mind you, I looked and tried everything I could possibly think of for hours!)?

What’s really bothering me is that most UE4 Templates (started off with Third Person BP Template) put all the input related logic into the PlayerCharacter BP which does not seem to work in a packaged game.

Second issue: Collision Events
In my game I have a PlayerCharacter, basically just a sphere and a capsule component with basic collision settings (Pawn, Generate Overlap Events, Simulation Generates Hit Events) and another actor BP which can be collected (capsule component for collision, OverlapAllDynamic). The player would check for overlapping events, and in turn call a method on the overlapped actor. Once again this worked fine in the editor. In the packaged game however there was no event. I made sure of that. The Overlap Event did not fire. I then decided to turn things around and let the other actors check for overlap events with the PlayerCharacter - and to my surprise - they fired and everything was working like it was supposed to.
What went wrong here? Why did the first setup work in the editor but not in the packaged game, and why does the second setup work in both?

Almost forgot, I am using UE 4.6.1.

Is you input events using actual keys(like ‘W’), or a project setting bind( like ‘InputAction MoveForward’ )?
This is odd for sure, I haven’t test package after upgrade my project to 4.6.1, I’ll try this tonight.

On the second one, just so you know even though Input Events also use the red color code, but it was treated differently.
See my signature for a chart in official document that have input event priorities.

The inputs were set up in the project settings and were successfully written to the DefaultInput.ini in the Config folder, I double checked that.

Alright, so I just created a new Third Person Blueprint project, packaged it and all the inputs worked fine (development & shipping build). If I manage to figure out what went wrong with my other project I will let you know.

If you wondering, in blueprint editor, Ctrl+Shift+F(or Edit->Find in Blueprints) and search your input events.
See if there is anything else that could consume your events.