5.3 cannot import 4.27

Hi

as I import my 4.27 project, 5.3 refuses to launch it, saying “try to compile manually”
I then right click/ generate project files, then load the .sln file in vs 2022

it complains that debugging cannot run, and I just don’t see my project, just a solution with everything but my project

I checked the source folder, it is empty

how do I solve this ?

thanks for your help

The source folder IS your project. If that folder is empty then there is nothing to compile.
You need to copy over the files from the old project and make changes to deprecated functions to have it work with 5.3.

The content folder are only the game assets (models, audio, video).
The logic & building blocks of the game are in the header and cpp files. They are what the compiler turns into a running project.

I thought about copying them indeed
but they were clearly generated with 4.27

doesn’t make any sense not to import them when I convert the project to 5.0

I’ll try that anyway…

Why can’t you make a copy of the whole project and just switch it’s engine version in the uproject file (right click switch engine) an generate it that way. The solution should generate fine, you just need to go into the code later on and update what has been changed between 4.27 and 5.3.

hence this post

it generates files, but nothing in the Source folder, and as I open it in VS, there is no game

if I open the project with the editor, it complains it cannot compile

I tried copying the files from the old project in the Source folder, but it does not load in the VS project

the structure is not even the same

I even used beyond compare to try finding the reference to the Source folder or the target.cs files…could’nt find any

4.27 and 5.3 are way too far apart

ok I managed to add the project to VS solution:

  • I added the source content
  • I renamed 4_27 to 5_3
  • I updated the two target.cs files
  • I regenerated the project files with right click on the uproject
  • opening the sln in VS2022 I set my game as startup project

now I can start the project build !!

BUT … when building I get this error :

Could not find definition for module '************_5_3', (referenced via ************_5_3.Target.cs)

I’m guessing it might be your uproject fiile internals don’t have the right module name assigned.

Open it up in vs or any text editor. It should look something like this:

{
	"FileVersion": 3,
	"EngineAssociation": "5.3",
	"Category": "",
	"Description": "",
	"Modules": [
		{
			"Name": "MyProjectName",
			"Type": "Runtime",
			"LoadingPhase": "Default",
			"AdditionalDependencies": [
				"Engine",
				"CoreUObject"
			]
		}
	],
	"Plugins": [
		{
			"Name": "ModelingToolsEditorMode",
			"Enabled": true,
			"TargetAllowList": [
				"Editor"
			]
		}
	]
}

As you can see inside of the modules you should see the name of your project (in this case swapped out for MyProjectName).

Check it it’s still '************_4_27 instead of '************_5_3

I’d also check the class name in your build file if it lines up to the new version. (the class name and it’s version of a constructor)

Good to see you making progress.

I checked that already but

  • landmass = is in 5.3
  • editor scripting utilities = is in 5.3
  • impostor baker = is in 5.3
  • PhysxVehicles = not in 5.3 (physx was phased out and replaced by chaos)

Don’t forget to check the build file

I know about physx, that’s why I removed it in 5.3

build file ?

Also 1 more file that might impact the project The main file called like with the name like your project cpp

ReplaceWithYourProjectName.cpp

it will have the line

IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, YourProjectName, "YourProjectName" );

also replace it’s top include to the 5_3 version of the header file

It should be in the source/yourproject/ folder.

ok I replaced all 4_27 to 5_3 in the source files, now I get these undefined

even after a full rebuild…wonder if the make file is missing something

oh, there is no make file…and it still complains that module is missing

I usually split the files into public / private folders for custom files like epic does.

Public for exposed headers
Private for cpp files
Then my ide picks them up

Though here it might be a matter of the intermediate folder / projectname / filter file. It might not be pointing to your header and cpp files correct dir. Just a guess. (Normally its generated by the unreal header tool)

I should not even be fiddling with this, the conversion fails miserably
not only becos of the physics plugin, this is just basic conversion that worked fine before

I guess I’ll have to restart a new project in 5.3, so back to 4.27 instead

I got no time to waste with this honestly