Hi.guys:
I have created a structure named FDamageData like below:
USTRUCT(BlueprintType)
struct FDamageData {
GENERATED_USTRUCT_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Data")
bool bIsPhysics;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Data")
bool bIsRadial;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Data")
EElementType ElementType;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Data")
EDamageBaseType DamageType;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Data")
EDamageEffect DamageEffect;
FDamageData() :
bIsPhysics(false), bIsRadial(false), ElementType(EElementType::None),
DamageType(EDamageBaseType::None), DamageEffect(EDamageEffect::None)
{}
FDamageData(
bool bIsPhysicsIn,
bool bIsRadialIn,
EElementType& ElementTypeIn,
EDamageBaseType& DamageBaseTypeIn,
EDamageEffect DamageEffectIn)
:
bIsPhysics(bIsPhysicsIn),
bIsRadial(bIsRadialIn),
ElementType(ElementTypeIn),
DamageType(DamageBaseTypeIn),
DamageEffect(DamageEffectIn)
{}
};
now I want to use it in another c++ class like:
You can see that the auto prompt of FDamageData goes wrong, compiler treats this structure as a FHitResult, so what should I do to fix this?
Thanks a lot for your time.