Wrong PlayerController in Cooked/Packaged Version

I have an own GameMode with an own PlayerController. I start a Level with the OpenLevel blueprint node with the argument

?game=/Game/Gameplay/BP_GameMode_Game_Coins.BP_GameMode_Game_Coins_C

All works fine in Editor and also in “Standalone” Version but in cooked or packaged Version the GameMode uses the original “PlayerController” instead of my own one. The GameMode itself is the right one.

I’ve made a packaged version two weeks ago where all was fine. I cannot see any difference in the Blueprints since there. (Maybe the Update from 4.7.6 or 4.8.0 to 4.8.1?)

I’ve recompiled my GameModes and repackaged the Game for some Times and also activated “Full Rebuild” in the Package Settings.

Edit: I don’t see any error message related to this problem in the log.

Hi ,

Since you started seeing this when you moved to the update, here is something to try. In the Engine folder, delete the DDC (Derived Data Cache). In your project, delete the Intermediate, the Saved, and the Binary folders.

When you next try to package it will take considerably longer as the shaders will need to newly compile, but this should get rid of any old or corrupted files that haven’t gotten deleted.

If you try that and you’re still seeing the same problem, please attach your output to this thread as a txt file.

Thanks!

This doesn’t help. The are in the attachment.

49368-debug+log.txt (53.8 KB)
[2]: 49369-output+log.txt (4.56 MB)

Some more Information:
the relevant GameModes are BP_GameMode_Game_Coins BP_GameMode_Game_ControlPoints and BP_GameMode_Game_Aim. All are derivates of BP_GameMode_Game.

I tried to package on a Mac: there I have the same behaviour.

Hey,

I have a few questions for you to answer, hopefully this will help us figure out what’s going on with your project:

  • Did you upgrade your project to different versions of the engine?
  • If so, how many times?
  • Did you obtain the engine through the launcher or through GitHub?
  • Have you tried recreating your player controller?

In regards to these answers, could you also upload your full project and provide it to me through a private message on the forums? Simply zip it and upload it to a site or your Drive and provide me with the link.

Looking forward to hearing back from you, thanks!

Hi,

with a lot of work I’ve found a very very weird behaviour. The Bug appears when in I use a “Cast to BP_GameMode_Game” node in the Blueprint of BP_BoatPawn (only connected with the input execution wire).
The Bug also appears when I create a Variable of Type BP_GameMode_Game Reference also if I don’t use this Variable.
It seems that the Bug appears if I use BP_GameMode_Game in BP_BoatPawn in some way.

Note: BP_GameMode_Game does not use BP_BoatPawn as default Pawn (“None” is set) but it spawns and possess BP_BoatPawn in its Blueprint.

Your Questions:
We started the Project with 4.7.5 and updated it with all releases (4.7.6, 4.8.0, 4.8.1)
We only use Launcher-Versions.
I havn’t recreated the PlayerController yet.
I cannot uploat the whole project (I think our management must allow it)
I tried to reproduce the Bug in a new Project but I cannot reproduce it.

I cannot Debug the cooked Version ([Link][1]) so I don’t know how to find the Bug myself. Is there anything I can try?

Debugging Cooked/Packaged Version with Symbols - Programming & Scripting - Epic Developer Community Forums

Hey,

Typically when you switch engine versions in-between projects, you have to recreate certain aspects of your projects, such as blueprints. This is especially the case when you’re upgrading each time the engine upgrades. In this case, I believe that is what you’ll need to do with your PlayerController.

However, before spending the time to recreate your PlayerController, I would like it if you could please open up the last version of your project that you had before the PlayerController started causing you complications.

Once you’re in your older project, simply create a new project in 4.8.1 and migrate over the PlayerController from your project to the new project template. Test it there and see if it works. If it does, I would then go back to your older version of the project and migrate over the PlayerController to your actual new version of the project your team is working on and then test to make sure it’s working.

If it is not working, I would go back to my previous statement and actually recreate the PlayerController and possibly the associated blueprints ‘BP_GameMode_Game’ and ‘BP_BoatPawn’.

I hope this helps, thanks!

Hi,

I think the problem is not caused by the updates. I’ve reimplemented the PlayerController with no effect but maybe I’ve found the problem. It seems that this only appears, when the same PlayerController is set in base and derived blueprint class. I’ve set the PlayerController in the BP_GameMode_Game class to the standard “PlayerController” and in all derived GameModes to BP_BoatController. Now all works perfectly.

It seems to be a similar problem like a bug I postet earlier: [link][1] The Engine “forgots” some values when they are not overwritten by an derived object.

Datatable losses float values - Community & Industry Discussion - Epic Developer Community Forums

Hey,

I’m really glad that you’ve been able to resolve the issue your project was having without having to recreate the PlayerController, BP_GameMode_Game and BP_BoatPawn. I will look more closely into this and see if it’s something I am able to reproduce. If you have any further questions, please feel free to reply back here or post a new question to AnswerHub.

I hope you have a wonderful weekend!

FYI, I ran into a similar issue where I had renamed my GameMode blueprint but Config\DefaultEngine.ini didn’t get updated with the new name: