Cross referencing GameState and PlayerController in Event Begin Play causes crash


I came accross some bugs while developing my first game using UE4 (a puzzle game), I’ll try to list all of them, however, the purpose of this is to know if they are known bugs or not since UE4 is meant to be used by early adopters.

1) Cross reference GameState and PlayerController in their EventBeginPlay (using respectively GetPlayerController and GetState), the app crashed if I try to launch it on Windows. => Temporary fixed it by not referencing PlayerController in the GameState ( cross ref are not good, I know :slight_smile: )

2) A tricky one, but was able to find it by debugging the editor using the GitHub code :

Declared an event (OnDifficultySelected) on the custom Hud, with an Input of type Enum.

Bound that event on the PlayerController.

Called that event on the Hud without passing any input.

When I launched the game (Mobile Preview and Standalone window), it crashed and the log didn’t show something useful.

=> Temporary fixed it by removing that input as I didn’t need it anymore, and cross ref is bad!!

3) Foreach on a custom Enum doesn’t always work => it goes to “Completed” directly instead of going to “LoopBody”.

4) On Mobiles, HitBox doesn’t work “automatically” with Touch events, make the Canvas useless to interact with users.

5) On Mobiles, the enum values doesn’t appear correctly, the enum to string shows NewEnumerator0, NewEnumerator1 and so on, instead of the correct string values.

That’s it for now :slight_smile:

  • The good point is that I was able to do all the algorithm part using BPs only (it’s funny tough I’m a programmer), the graphical part (not completed the Hud for mobiles).
  • The bad point is that my game is almost over, but I’m and will be unable to deploy it to mobiles … for now

I’ll be waiting for your feedbacks

Thank you

My I ask how you got the HitBox to work with Touch events? I spent all day yesterday working on a Hud for mobile. Got it working great some odd things like events needing a small delay. Then launched it on mobile not working. Any help would be great

I came to the conclusion that HitBoxes doesn’t work yet with Touch events, you can get the position of the touch (vector) and do the work manually to check if it’s within the hitbox. Maybe the 4.1 will fix this ?

Hi Singleton,

Please make individual posts for each bug that you are experiencing for tracking and so that we can better address each potential issue separately. Thank you!

Hi Adam,

It’s been a while since I last checked this post out. Anyways, most of the points on this post have been fixed in the 4.2 release.

Thank you