Hello.
I want to make USTRUCT, that can have parent object with same type:
USTRUCT(BlueprintType)
struct RETARGETTEST_API FMYJOINT
{
GENERATED_USTRUCT_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "LifeSim|GWorld")
FString name = "";
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "LifeSim|GWorld")
bool isRoot = false;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "LifeSim|GWorld")
TArray<float> offset;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "LifeSim|GWorld")
TArray<FString> channels;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "LifeSim|GWorld")
FMYJOINT parentJoint;
};
The problem is code
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "LifeSim|GWorld")
FMYJOINT parentJoint;
It gets error
Error c:\users\\documents\unreal projects\retargettest\source\retargettest\MyStaticMeshActor.h(28) : error C2460: 'FMYJOINT::parentJoint' : uses 'FMYJOINT', which is being defined
Error C:\Users\\Documents\Unreal Projects\RetargetTest\Source\RetargetTest\MyStaticMeshActor.h(28) : error C2460: 'FMYJOINT::parentJoint' : uses 'FMYJOINT', which is being defined c:\users\\documents\unreal projects\retargettest\source\retargettest\MyStaticMeshActor.h(10) : see declaration of 'FMYJOINT'
How to fix this issue?
Thank you!