USTRUCT : Property not initialized properly error - how to fix?

Hi, I’m a bit lost trying to solve an error showing up when loading a project containing a 3rd party plugin I’ve updated from 5.4 to 5.5.

“LogClass: Error: StructProperty FCPathNode::WorldLocation is not initialized properly even though its struct probably has a custom default constructor. Module:CPathfinding File:Public/CPathNode.h”

This appears to be the struct / property in question (found in CPathNode.h):

USTRUCT(BlueprintType)
struct CPATHFINDING_API FCPathNode
{
GENERATED_BODY()

		FCPathNode() {}
FCPathNode(FVector Location)
	:
	WorldLocation(Location)
{}

    UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = CPath)
FVector WorldLocation;

// Normalized vector pointing to next node. ZeroVector on last node.
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = CPath)
	FVector Normal = FVector(0, 0, 0);

};

Also in the CPathNode.h file, the line “FVector WorldLocation;” appears under an internal class - but I don’t know if this is relevant to the issue with the struct.

Can provide more details if helpful.

try initializing worldlocation.
e.g. FVector WorldLocation = FVector::Zero;

1 Like