Spawning Actors in BP not working correctly in mobile

Reproduction:

  • Open First Person BP project,
  • Create new Blueprint from Actor - name it “EnemyText”,
  • Create another blueprint from Character - name it AIPawn,
  • Somewhere in AIPawn spawn EnemyText (for example TakeDamage or PostBeginPlay)
  • You will see that EnemyText will spawn correctly in PC but not in mobile.

I can get location values from spawned EnemyText but I can’t see anything else. No mesh (I’ve assigned one), no other variables - everything is NULL.

It’s pain that something that core like spawning actors is working on PC without a problem but on Mobile Preview isn’t,

This is really weir. This bug happens only when you are working with Arrays in PostBeginPlay.

If you disconnect everything after “Hello” string - it will spawn, but if you connect it you will have the issue described above.

8470-hudbp.png

So yeah I’m stuck because of this, can’t move forward with my game.

More informations:

  • The actor isn’t spawning when you have HUD update function with foreach on the EnemyText New,
  • I moved the Array into PlayerController (from HUD) and still it isn’t spawning, (on PC eveyrhing is OK)

I think that this is something with arrays and foreach.

And here you can find my blueprints:

EnemyTextNew - Actor,
MyHUD render,
Level Blueprint for spawning actor,

Working well on PC. Isn’t working on mobile.

//TTT is EnemyTextNew Array in PlayerController.

When I delete Destroyed function from EnemyTextNew - everything works so there is an bug with this Event on Mobile.

I’ve another update on this. When I’m casting (from LevelBlueprint) to MyGame or PlayerController HUD is stoping to draw on Mobile.

You should test HUD on Mobile guys. I think that there is something really wrong. Basically I can’t create HUD for my game now because I don’t know how to.

I will be grateful if someone can look at this CRITICAL for mobile issue.

Hello,

Thank you for your report. We were not able to investigate this on the engine version you reported, but there have been many version changes to UE4 since this question was first posted. With a new version of the Engine comes new fixes and it is possible that this issue has changed or may no longer occur. Due to timetable of when this issue was first posted, we are marking this post as resolved for tracking purposes.

If you are still experiencing the issue you reported in the current engine version, then please respond to this message with additional information and we will investigate as soon as possible. If you are experiencing a similar, but different issue at this time, please submit a new report for it.

Thank you.