USTRUCT UPROPERTY struct -> unknown error

Hi,

Why does the UPROPERTY make compile error ?

USTRUCT(BlueprintType)
struct FPlanet
{
    	GENERATED_USTRUCT_BODY()
    
    	UPROPERTY() // <------------- error code: OtherCompilationError (5)	
    	TArray<FPlanet> Moons;
    
    	AAUPlanet * PlanetActor;
    	TArray<AAUPlanet*> MoonsActors;
    
    	FSolarSystem * SolarSystem;
    	FPlanet * Planet; // for moons only

    	void Generate(bool isMoon = true);
 };

Hey -

What is the compile error that you’re getting? If the error window is reporting OtherCompilationError(5) you can switch to the Output window which should provide further information on what the exact error is.

Cheers

Try doing:

TArray<struct FPlanet> Moons;

Structure recursion is not supported for properties… doh !