UNavMovementComponent Properties getting clobbered during serialization because of FortniteReleaseBranchCustomObjectVersion?

We’ve noticed that somewhere around UE5.5.4 there has been a change to UNavMovementComponent to add a serialize function that, in editor only, checks a custom linker version variable for the current “FortniteReleaseBranchCustomObjectVersion” to see if it’s (I assume) newer than a specific feature release, and if it isn’t it clobbers a bunch of properties with “deprecated” field values.

This was causing issues for us because we needed some of those values to be set differently than what it was setting, and it was causing a disparity between editor behavior and builds.

Is there any purpose to this or an intended workaround? The naming convention (specifically being about a Fortnite branch) makes it look like it might have slipped through the cracks from some internal code.

In the meantime we have disabled the offending editor code with preprocessor directives, but would like to know what the intent of this was and if this was the right course of action.

The offending code, found in NavMovementComponent.cpp:

`void UNavMovementComponent::Serialize(FArchive& Ar)
{
Super::Serialize(Ar);
#if WITH_EDITOR
if (Ar.IsLoading() && GetLinkerCustomVersion(FFortniteReleaseBranchCustomObjectVersion::GUID) < FFortniteReleaseBranchCustomObjectVersion::NavMovementComponentMovingPropertiesToStruct)
{
PRAGMA_DISABLE_DEPRECATION_WARNINGS

    NavMovementProperties.FixedPathBrakingDistance = FixedPathBrakingDistance_DEPRECATED;
    NavMovementProperties.bUpdateNavAgentWithOwnersCollision = bUpdateNavAgentWithOwnersCollision_DEPRECATED;
    NavMovementProperties.bUseAccelerationForPaths = bUseAccelerationForPaths_DEPRECATED;
    NavMovementProperties.bUseFixedBrakingDistanceForPaths = bUseFixedBrakingDistanceForPaths_DEPRECATED;
    NavMovementProperties.bStopMovementAbortPaths = bStopMovementAbortPaths_DEPRECATED;

    PRAGMA_ENABLE_DEPRECATION_WARNINGS
}

#endif // WITH_EDITORONLY_DATA
}`

Thank you for bringing this to our attention! I believe this was likely something that got merged from our other branches by accident. If you remove this section, does the behavior go back to what you had seen previously?

I spoke with the dev who made this change today. They have a CL in for review that should make it into 5.6 to address this.

It appears to fix the issues we were seeing, yes. Thanks for your reply!