#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Components/ActorComponent.h"
#include "TestCircularDependency.generated.h"
USTRUCT()
struct FTestStruct
{
GENERATED_BODY()
FTestStruct(){}
FTestStruct(const class UTestComponent* InOwner) : Owner(InOwner){};
UPROPERTY(Transient)
const class UTestComponent* Owner = nullptr;
};
UCLASS(Blueprintable)
class UTestComponent : public UActorComponent
{
GENERATED_BODY()
UPROPERTY(Transient)
FTestStruct Member = { this };
};
UCLASS(Blueprintable)
class HOOD_API ATestActor : public AActor
{
GENERATED_BODY()
ATestActor()
{
static const FName TestCompName = TEXT("TestComponent");
TestComp = CreateOptionalDefaultSubobject<UTestComponent>(TestCompName);
}
UPROPERTY(EditDefaultsOnly)
class UTestComponent* TestComp = nullptr;
};