4.8 Transition Guide

Dear Community,

Thank you for 4.8 Epic!

's a thread were anyone can post their findings and research as they are upgrading their projects to 4.8!

Feel free to post the compiler errors and the solutions you found.

You can also post compile errors or other 4.8 upgrade bugs/issues that you have not figured out so that everyone can combine their powers to do the upgrade process.

I will add more to this initial post as I begin doing 4.8 upgrading.

But everyone, please feel free to post right now to share your research / ask questions!

:slight_smile:

we go again :slight_smile:

Changes to Game Mode in C++, have to add _Implementation

Quoting Epic:

Essential virtual Game Mode functions like FindPlayerStart now have to have _Implemention added to them when you override them in C++.

"
And finally (and arguably most importantly) the following functions can be overridden in Blueprints.



ReadyToStartMatch
ReadyToEndMatch
ShouldReset
MustSpectate
GetDefaultPawnClassForController
InitStartSpot
SpawnDefaultPawnFor
CanSpectate
FindPlayerStart         <~~~~
ChoosePlayerStart     <~~~~
PlayerCanRestart        <~~~~


Note: To allow the Blueprints to override these functions, we had to change them to be Blueprint Native Events in C++, which will require any overridden implementations to use the “_Implementation” suffix on your function names.

Two other changes were made to Game Mode that affect C++:
DefaultTimer has been removed.
PlayerStarts array has been removed. TActorIterator<APlayerStart> should be used instead.
"

**Full Description **

:slight_smile:

I feel that this is a pretty smooth transition so far. Only problem I had was a deprecation warning:


'UWorld::LineTraceSingle' deprecated: Use LineTraceSingleByChannel instead

Even my EditorPlugin worked without problems. I had a much harder time from 4.6 to 4.7.

My sun sky_sphere lightshafts are not rendering correctly in DK2 , there is a big difference in angle between the left and right eye lightshafts. (works perfect in 4.7), also when I try to package a project for windows it complains about installing visual studio. (packaging worked fine in 4.7). Otherwise loving 4.8 so far!

Awesome New Multiplayer C++ Feature

Dear Community,

From the release notes

"
New: Now you can specify your own function names for Implementation and Validate methods using keywords! E.g. UFUNCTION(Server=“MyServerImplementationMethodName”, WithValidation=“MyServerValidateMethodName”).

Note that when you decide to specify your own function name, you also have to declare it manually in the class header.
"

so



UFUNCTION(Reliable, Server, WithValidation)
void SERVER_SetShipIsRelaxed();
bool SERVER_SetShipIsRelaxed_Validate();
void SERVER_SetShipIsRelaxed_Implementation();


can now become



UFUNCTION(Reliable, Server="SERVER_SetShipIsRelaxed_I", WithValidation="SERVER_SetShipIsRelaxed_V")
void SERVER_SetShipIsRelaxed();
bool SERVER_SetShipIsRelaxed_V();
void SERVER_SetShipIsRelaxed_I();



@DennyR

Yes I Agree, 4.8 has been a smooth transition so far!

:)

I found a strange bug?!.

PhysicsConstraintComponents can only constrain 2 MeshComponents together. Using a SceneComponent as base does no longer work.

I have just made a copy of my 4.7 project and wanted to look at some of the new cool features of 4.8 when I noticed that my project somehow didn’t convert my foliage correctly
4.7



4.8

Seems like the setup of the LOD’s have changed, but I didnt activate the new Hierarchical LOD feature nor have I changed anything in the setup compared to the 4.7 project, but it looks much worse in 4.8. :frowning: Have I done anything wrong? I hope someone can help me.

Thanks in advance

What happened to AActor::ReceiveActorBeginOverlap and AActor::ReceiveActorEndOverlap? They use to be virtual, and overridable. Are we supposed to use AActor::NotifyActorBeginOverlap? Didn’t see this in patch notes.

Hey Guys,

I’ve been having an issue building via Visual Studio, looked around and have yet to find a solution. Anyone else getting this?..
“D:\workspace_name\project_name\Source\project_name\Public\xyz.h(10): fatal error C1083: Cannot open include file: ‘xyz.generated.h’: No such file or directory”

Only issue I had on a project conversion that wasnt easily fixable was my MoveTo task in my Behavior tree broke.

Its just the stock MoveTo Task Node in UE and worked fine with my AI code in 4.7. But in 4.8 it just immediately succeeds. All of the rest of the code checks out but the Behavior tree on runtime shows it as succeeding without any movement.

Anyone have similar issues?

Problem too, first time i am having trouble makeing a transition. I get a crash when open the project


Unknown exception - code 00000001 (first/second chance not available)

"Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.8\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 678] 
Arr

KERNELBASE
UE4Editor_Core!FOutputDeviceWindowsError::Serialize() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:95]
UE4Editor_Core!FOutputDevice::Logf__VA() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\misc\outputdevice.cpp:144]
UE4Editor_Core!FDebug::AssertFailed() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\misc\outputdevice.cpp:355]
UE4Editor_BlueprintGraph!UK2Node::ExpandSplitPin() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\blueprintgraph\private\k2node.cpp:687]
UE4Editor_BlueprintGraph!UK2Node::ExpandNode() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\blueprintgraph\private\k2node.cpp:712]
UE4Editor_BlueprintGraph!UK2Node_VariableGet::ExpandNode() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\blueprintgraph\private\k2node_variableget.cpp:386]
UE4Editor_KismetCompiler!FKismetCompilerContext::ExpansionStep() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\kismetcompiler\private\kismetcompiler.cpp:2535]
UE4Editor_KismetCompiler!FKismetCompilerContext::ProcessOneFunctionGraph() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\kismetcompiler\private\kismetcompiler.cpp:3043]
UE4Editor_KismetCompiler!FKismetCompilerContext::CreateFunctionList() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\kismetcompiler\private\kismetcompiler.cpp:3132]
UE4Editor_KismetCompiler!FKismetCompilerContext::Compile() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\kismetcompiler\private\kismetcompiler.cpp:3371]
UE4Editor_KismetCompiler!FKismet2CompilerModule::CompileBlueprintInner() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\kismetcompiler\private\kismetcompilermodule.cpp:99]
UE4Editor_KismetCompiler!FKismet2CompilerModule::CompileBlueprint() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\kismetcompiler\private\kismetcompilermodule.cpp:155]
UE4Editor_UnrealEd!FKismetEditorUtilities::GenerateBlueprintSkeleton() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\kismet2\kismet2.cpp:893]
UE4Editor_UnrealEd!FBlueprintEditorUtils::RegenerateBlueprintClass() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\kismet2\blueprinteditorutils.cpp:1412]
UE4Editor_CoreUObject!FLinkerLoad::RegenerateBlueprintClass() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\blueprint\blueprintsupport.cpp:332]
UE4Editor_CoreUObject!FLinkerLoad::FinalizeBlueprint() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\blueprint\blueprintsupport.cpp:1140]
UE4Editor_CoreUObject!FLinkerLoad::Preload() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3098]
UE4Editor_CoreUObject!FLinkerLoad::CreateExport() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3698]
UE4Editor_CoreUObject!FLinkerLoad::IndexToObject() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3882]
UE4Editor_CoreUObject!FLinkerLoad::CreateExport() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3413]
UE4Editor_CoreUObject!FLinkerLoad::IndexToObject() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3882]
UE4Editor_CoreUObject!FLinkerLoad::CreateExport() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3413]
UE4Editor_CoreUObject!FLinkerLoad::IndexToObject() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3882]
UE4Editor_CoreUObject!FLinkerLoad::CreateExport() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3413]
UE4Editor_CoreUObject!FLinkerLoad::CreateExportAndPreload() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2581]
UE4Editor_CoreUObject!FLinkerLoad::LoadAllObjects() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2689]
UE4Editor_CoreUObject!LoadPackageInternal() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:997]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2274]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2037]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2322]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2037]
UE4Editor_CoreUObject!FLinkerLoad::Verify() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:1827]
UE4Editor_CoreUObject!FLinkerLoad::FinalizeCreation() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:1737]
UE4Editor_CoreUObject!FLinkerLoad::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:627]
UE4Editor_CoreUObject!FLinkerLoad::CreateLinker() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:371]
UE4Editor_CoreUObject!GetPackageLinker() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linker.cpp:558]
UE4Editor_CoreUObject!LoadPackageInternal() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:931]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2274]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2037]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImportInner() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2322]
UE4Editor_CoreUObject!FLinkerLoad::VerifyImport() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2037]
UE4Editor_CoreUObject!FLinkerLoad::Verify() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:1827]
UE4Editor_CoreUObject!FLinkerLoad::FinalizeCreation() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:1737]
UE4Editor_CoreUObject!FLinkerLoad::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:627]
UE4Editor_CoreUObject!FLinkerLoad::CreateLinker() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:371]
UE4Editor_CoreUObject!GetPackageLinker() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linker.cpp:558]
UE4Editor_CoreUObject!LoadPackageInternal() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:931]
UE4Editor_CoreUObject!ResolveName() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:677]
UE4Editor_CoreUObject!StaticLoadObjectInternal() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:764]
UE4Editor_CoreUObject!StaticLoadObject() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:826]
UE4Editor_CoreUObject!StaticLoadClass() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:851]
UE4Editor_CoreUObject!UClass::CreateDefaultObject() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\class.cpp:2587]
UE4Editor_CoreUObject!UObjectLoadAllCompiledInDefaultProperties() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:706]
UE4Editor_CoreUObject!ProcessNewlyLoadedUObjects() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:797]
UE4Editor_CoreUObject!TBaseStaticDelegateInstance<void __cdecl(void)>::ExecuteIfSafe() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:921]
UE4Editor_Core!TBaseMulticastDelegate<void>::Broadcast() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:1031]
UE4Editor_Core!FModuleManager::LoadModuleWithFailureReason() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\modules\modulemanager.cpp:431]
UE4Editor_Projects!FModuleDescriptor::LoadModulesForPhase() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\projects\private\moduledescriptor.cpp:370]
UE4Editor_Projects!FProjectManager::LoadModulesForProject() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\projects\private\projectmanager.cpp:52]
UE4Editor!FEngineLoop::LoadStartupModules() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launchengineloop.cpp:1922]
UE4Editor!FEngineLoop::PreInit() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launchengineloop.cpp:1444]
UE4Editor!GuardedMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launch.cpp:110]
UE4Editor!GuardedMainWrapper() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]

(On 4.7.6 works just fine)

I have a lot of errors resulting from overrides. What’s the proper way to override GameMode functions? I tried appending _Implementation in both the .h and .cpp but I still get “doesn’t override any base method” error.

Same … many override functions missing.

><"

Crash when attempting to launch the project.



<ErrorMessage>Fatal error: [File:C:\Users\Nicholas\code\UnrealEngine\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 2566] 
NewObject with empty name can't be used to create default subobjects (inside of UObject derived class constructor) as it produces inconsistent object names. Use ObjectInitializer.CreateDefaultSuobject<> instead.
</ErrorMessage>


No callstack. Neither NewObject nor ConstructObject exist in my codebase. I’m going to see if changing all legacy GENERATED_UCLASS_BODY macros to GENERATED_BODY fixes it.

If you are overriding GameMode functions and you make a call to the parent, you have to add _Implementation to the call as well. For example: Super::FindPlayerStart_Implementation( … );

Some GameMode functions have changed parameters, for example SpawnPlayerController has an extra NetRole parameter:



	virtual APlayerController* SpawnPlayerController(ENetRole RemoteRole, FVector const& SpawnLocation, FRotator const& SpawnRotation);


With these ‘override’ errors I found it easiest to open up GameMode.h (in Visual Studio search in the solution explorer) and compare the parameters of GameMode and the subclass.

Some Receive___ functions have been made BlueprintImplementableEvents so cannot be overriden in C++ anymore, for example: ReceiveTick, ReceiveHit, ReceiveDrawHUD. They were probably intended to only be overriden by blueprints. You should use Tick, NotifyHit and DrawHUD for these.

UINTERFACE(dependson=UVictoryCore, MinimalAPI)

error : The dependsOn specifier is deprecated. Please use #include “ClassHeaderFilename.h” instead.

Just remove the dependson specifier and add an #include “VictoryCore.h” file

: ‘RepRetry’ is deprecated.

Just remove the RepRetry specifier and just use ‘Replicated’ solely.

Reference: What does RepRetry do? - Multiplayer & Networking - Unreal Engine Forums

LogCompile:Error: Remapping old metadata key ‘FriendlyName’ to new key ‘DisplayName’, please update the declaration.

//New way
UFUNCTION(BlueprintImplementableEvent, meta = (DisplayName= “Plaid Catz”))