Changing World Settings Class permanantly breaks Third-Person starter code

Steps to reproduce:

Open UE4 Editor.

Go to New Project, choose Code Third Person, name it anything you want, create it.

Build in VS, open .uproject to verify that it works.

In Editor, go to File >> Add Code to Project and select World Settings as parent class, type in any name, and select Create Class.

Open VS, close Editor, and build the game again.

Open the Editor again to verify that it still works.

In Editor, open Edit >> Project Settings, then go to General Settings. Change the World Settings Class to the newly created class. Click Set as Default at top. Hit Save and close Editor.

Re open editor and you will get the following error message:

Default Property warnings and errors:

Error: CDO Constructor: Failed to find

Class’/Game/Blueprints/MyCharacter.MyCharacter_C’".

The Editor message log will contain the following errors and warnings:

/Game/Blueprints/MyCharacter : Can’t find file for asset. /Script/TP_ThirdPerson

Failed to load /Script/TP_ThirdPerson.TP_ThirdPersonCharacter Referenced by MyCharacter Property /Script/Engine.Blueprint:ParentClass

Failed to load /Script/TP_ThirdPerson.TP_ThirdPersonCharacter Referenced by MyCharacter Property /Script/Engine.BlueprintCore:GeneratedClass

Failed to load /Script/TP_ThirdPerson.TP_ThirdPersonCharacter Referenced by PackageMetaData

The third-person character is now broken; camera moves freely around scene and there is no pawn.

Go back into the Project Settings menu and revert World Settings Class to the default WorldSettings, hit Set as Default, then Save and close the Editor.

Open the Editor; the errors persist.

The only thing to do from here on out is to move the Source folder to a new project and never touch the World Settings Class again.

Thanks for the report. I’ve reproduced this and am taking a look. Not quite sure what’s going on yet, but hopefully I can get it sorted out.

I vaguely recall seeing another thread on this somewhere though I can’t find it now. The bug is that when you clicked SetAsDefault in the project settings the class redirectors from the template to your project were wiped out.

If you open DefaultEngine.ini and add back in these lines (replacing WorldSettingsFail with your project name) in to the [/Script/Engine.Engine] section manually you should be functional again and we will find a solution for the underlying bug:

+ActiveGameNameRedirects=(OldGameName="TP_ThirdPerson",NewGameName="/Script/WorldSettingsFail")
+ActiveGameNameRedirects=(OldGameName="/Script/TP_ThirdPerson",NewGameName="/Script/WorldSettingsFail")
+ActiveClassRedirects=(OldClassName="TP_ThirdPersonGameMode",NewClassName="WorldSettingsFailGameMode")
+ActiveClassRedirects=(OldClassName="TP_ThirdPersonCharacter",NewClassName="WorldSettingsFailCharacter")

Yup, that works! The GameMode needs to be manually changed back in the editor to get the pawn working again, but you solution does the trick. Thanks!

I reproduced this as well and figured out what’s going on. This has been bumped to high priority, and we will try get this fixed for 4.2. Thanks a lot for your detailed report, icannotfly!

We added a fix for this in CL# 2071719. It will be available in the upcoming 4.2 release. Thanks!

Awesome, thank you!

thank you thank you thank you thank you thank you . . . . . phew

I am currently having this problem, I mean… the error window keeps popping up even though I manually changed the lines of code in the engine file. It works fine, I’m not having any problem so far with the game but how can I fix it so the window would stop coming up when I start my game?

Hey -

Can you elaborate on the exact error message you’re receiving? This specific issue was fixed for 4.2 so we would need as much detail as possible to determine if your issue is a re-occurrence of the same issue or something new.

Default Property warnings and errors:
Error: CDO Constructor (NatusGameMode):Failed to find
/Game/ThirdPersonCPP/Blueprints/ThirdPersonCharacter.ThirdPersonCharacter_C

Error:CDO Constructor (NormalGameMode): Failed to Find
/Game/ThirdPersonCPP/Blueprints/ThirdPersonCharacter.ThirdPersonCharacter_C

Thanks for the answer !