Skip to main content

Step 5: C++ source (cpp)

Fixes the project's C++ sources and build files for 5.8. This step only edits files, so it can run from another 5.8 project with -target before the project builds (see Workflow).

Done automatically​

  • Line rules on .h, .cpp, .Build.cs and .Target.cs files:
    • moved headers (#include paths);
    • Build.cs / Target.cs settings (build settings version, include order, renamed modules);
    • Large World Coordinates renames generated from the engine's own redirects (float to double);
    • Gameplay Ability System API changes;
    • FGCObject::GetReferencerName, SavePackage arguments, UPackage::FileName.
  • Ensure-include rules: adds an include when a file uses a symbol that is no longer included indirectly.
  • Rules can be limited with whenFileContains / unlessFileContains, so they only fire where they apply.
  • Project files are regenerated.

Reported for you​

  • Matches of report-only rules, with file:line and a suggestion (for example PhysX or Matinee code).
  • The exact build command for the project (Notes).

Rule tables​

cpp.json: 122 line rules (93 automatic, 29 report-only) of five kinds (include, identifier, API, module, macro), plus ensure-include rules.

Examples​

Before (4.27)After (5.8)
#include "AssetRegistryModule.h"#include "AssetRegistry/AssetRegistryModule.h"
DefaultBuildSettings = BuildSettingsVersion.V2;BuildSettingsVersion.V7 plus IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_8
check(AbilitySystemComponent); in an ability taskcheck(AbilitySystemComponent.IsValid());
ABILITY_LOG without include#include "AbilitySystemLog.h" added
#include "PhysXPublic.h"reported: port the code to Chaos