Hello,
I have a project where I procedurally generate an Actor's properties. However, when restarting the editor, some of those properties are always nulled. I believe this is due to my UCLASS specifiers, but I am not sure how to fix it since I require some of them to edit everything inside the editor.
My structure is as follows :
Main class, which I spawn in the editor :
Settings class, which controls data input :
Shortened NoiseLayer.h class and one of its children, since its an abstract parent class :
The only data being saved after restarting the editor is the Seed, Radius and Resolution.
The array of NoiseLayers is allways nulled after restart.
How can I change my specifiers to properly save my data ?
I have a project where I procedurally generate an Actor's properties. However, when restarting the editor, some of those properties are always nulled. I believe this is due to my UCLASS specifiers, but I am not sure how to fix it since I require some of them to edit everything inside the editor.
My structure is as follows :
Main class, which I spawn in the editor :
Code:
UCLASS() ProceduralPlanetActor public : UPROPERTY(VisibleAnywhere, Instanced, Category = "Planet Settings") UProceduralPlanetSettings* PlanetSettings;
Code:
UCLASS(DefaultToInstanced) class PROCEDURALPLANETGENERATOR_API UProceduralPlanetSettings : public UObject { GENERATED_BODY() public: UPROPERTY(EditAnywhere) FRandomStream Seed; UPROPERTY(EditAnywhere) float Radius; UPROPERTY(EditAnywhere) int32 Resolution; UPROPERTY(EditAnywhere, Instanced) TArray<UNoiseLayer*> NoiseSettings;
Code:
UCLASS(Abstract) class NOISEGENERATOR_API UNoiseLayer : public UObject
Code:
UCLASS(EditInlineNew) class UValueNoise : public UNoiseLayer
The array of NoiseLayers is allways nulled after restart.
How can I change my specifiers to properly save my data ?