USTRUCT UPROPERTY struct -> unknown error


Why does the UPROPERTY make compile error ?

struct FPlanet
    	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 w77-

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.


Doug Wilson

Try doing:

TArray<struct FPlanet> Moons;

Structure recursion is not supported for properties… doh !