C++ Transition Guide for 4.26

Dear Community,

4.26 is heeere!


This is a thread where you can ask questions about the 4.26 upgrade process, or post your findings as you succeed at doing this yourself!

DeveloperSettings Module

If you use UDeveloperSettings for your plugins or games then you now need to include this in your build.cs:


  new string] {
    "DeveloperSettings"            <<~~~~~~~~~~~~~~~




**UCameraShake **is now called **UMatineeCameraShake **which inherits from UCameraShakeBase

I had to include PhysicsCore as a dependency when using UPhysicalMaterial.

Also the header include for UPhysicalMaterial changed to

 #include "PhysicalMaterials/PhysicalMaterial.h"

Able touches a lot of systems, so I have a pretty good list (the CameraShake has already been called out by Kaidoom15, so I’ll focus on the others I saw):

Sweeps now take in an FQuat for sweep rotation:

World->AsyncSweepByObjectType(EAsyncTraceType::Single, StartTransform.GetLocation(), EndTransform.GetLocation(), **FQuat::Identity,** ObjectQuery, Shape);

FAnimTickRecord swapped parameter order:

FAnimTickRecord& SequenceTickRecord = Proxy->CreateUninitializedTickRecord(SyncGroup, NAME_None); // Was previously (FName, SyncGroup)

Animation Sequences now take in a FAnimationPoseData struct when querying pose/curve data:


AnimSequence->GetAnimationPose(Output.Pose, Output.Curve, FAnimExtractContext(OutputTime, Output.AnimInstanceProxy->ShouldExtractRootMotion()));


FAnimationPoseData PoseData(/*FPoseContext*/Output);
AnimSequence->GetAnimationPose(PoseData, FAnimExtractContext(OutputTime, Output.AnimInstanceProxy->ShouldExtractRootMotion()));

Getting an Animation Pose requires using a new structure and has a new data type called FStackCustomAttributes:


FCompactPose Poses;
FBlendedCurve Curves;
float Weights = 0.0f;
AnimationSequence->GetAnimationPose(Poses, Curves, FAnimExtractContext(CurrentEntry.TimeAccumulator, Proxy->ShouldExtractRootMotion()));


FCompactPose Poses;
FBlendedCurve Curves;
FStackCustomAttributes Attribs;
float Weights = 0.0f;

FAnimationPoseData PoseA(Poses, Curves, Attribs);
AnimationSequence->GetAnimationPose(PoseA, FAnimExtractContext(CurrentEntry.TimeAccumulator, Proxy->ShouldExtractRootMotion()));

Likewise, BlendPosesTogether got updated:


FAnimationRuntime::BlendPosesTogether(Poses, Curves, Weights, Output.Pose, Output.Curve);


FAnimationRuntime::BlendPosesTogether(Poses, Curves, Attribs, Weights, PoseData);

If you have a custom Animation Graph Node, they changed up how you add a sync group.

UAnimBlueprint* AnimBlueprint = GetAnimBlueprint();
Node.GroupIndex = AnimBlueprint->FindOrAddGroup(SyncGroup.GroupName);
Node.GroupRole = SyncGroup.GroupRole;


UAnimBlueprint* AnimBlueprint = GetAnimBlueprint();
Node.GroupName = SyncGroup.GroupName;
Node.GroupScope = SyncGroup.GroupScope;
Node.GroupRole = SyncGroup.GroupRole;

They also added a new required virtual function called OnProcessDuringCompilation, but you can just pull that from of the other graph nodes - it’s pretty generic.

If you inherit from the FBlueprintEditor (or SCSEditor), the **CommonInitialization **got a new parameter added to it - you can read about what it does in the code.




CommonInitialization(MyAsset, false);

Probably a few others I’m forgetting, but obviously the Animation changes were what hit me the most.


Many core engine types (mostly physics ones) have, for some reason, been moved to ChaosPhysicsInterface.h and out of EngineTypes. This will result in quite a few linker errors possibly since that’s a different module, so you may need to include PhysicsCore as a dependency now. I was getting constant linker errors because of ERadialImpulseFalloff

PublicDependencyModuleNames.AddRange(new string] { "PhysicsCore" });

UDeveloperSettings also appears to have been moved to it’s own module, so you’ll need DeveloperSettings dependency too.

PublicDependencyModuleNames.AddRange(new string] { "DeveloperSettings" });

Here’s a fun one:

Calling IsInstanceSimulatingPhysics() on an FBodyInstance now required you to include the ‘PhysicsCore’ module too, because the function is inlined and calls a function from FBodyInstanceCore.

Looks like an oversight, as it produces very misleading linker errors.

HTTP Requests use Thread-Safe shared pointers now, so existing code needs to be updated also:

TSharedRef<IHttpRequest> NewRequest = FHttpModule::Get().CreateRequest();

TSharedRef<IHttpRequest, ESPMode::ThreadSafe> NewRequest = FHttpModule::Get().CreateRequest();

Base Delegate has changed too. Trying to pass a base delegate into an async task has changed from:

TBaseDelegate<ReturnType, ArgTypes...>



Check this in Delegate.h line 500.


TBaseMulticastDelegate<ReturnType, ArgTypes...>

change to:


My findings so far… :slight_smile:

If you’re implementing a new Animation Node type, with the editor node extending the AnimGraphNode_AssetPlayerBase type, they’ve added an override for *OnProcessDuringCompilation *to that class which is not API exported, causing a linking failure.

I plan to file a bug report for this, solution in the meantime is to copy-paste the guts of that functions implementation into your overriding class, and NOT calling UAnimGraphNode_AssetPlayerBase::OnProcessDuringCompilation from your implementation.

1 Like

Any reference to the RHI will not work as it is now a separate module.

For example if you are using the GPixelFormats map to load textures at runtime, you will get:

error LNK2019: unresolved external symbol "__declspec(dllimport) struct FPixelFormatInfo * GPixelFormats"

Simply add RHI to the modules to solve

PublicDependencyModuleNames.AddRange(new string] { "RHI" });