Hey, thanks for your answer and sorry for the delay !
I deleted then added one per one the content of my class USpell and found that the function Tick was causing the crash when creating the Blueprint (The abstract tag does not seem to affect the crash) :
void USpell::Tick(float DeltaTime)
{
if (ActualCharges == ChargesMax)
{
CooldownResource->Add(CooldownResource->ValueMax);
}
// else if (CooldownResource->IsEmpty())
// UNCOMMENT THIS LINE
{
// CooldownResource->Add(CooldownResource->ValueMax);
// OR THIS LINE
ActualCharges++;
}
}
Uncomment one of the two lines result in a crash when creating the Blueprint. I don’t really see how the crash is caused, maybe by accessing two or more time at the same FTickableObject in a Tick function ?
Edit : This is the code of my UResource :
Resource.h :
#pragma once
#include "Object.h"
#include "Resource.generated.h"
/**
*
*/
UCLASS()
class BACASABLE_API UResource : public UObject, public FTickableGameObject
{
GENERATED_BODY()
public:
// Setting default values
UResource();
virtual void PostInitProperties() override;
// Implementing FTickableGameObject functions
void Tick(float DeltaTime);
bool IsTickable() const;
TStatId GetStatId() const;
UPROPERTY()
float ValueMax;
UPROPERTY()
float ValueInit;
UPROPERTY()
float ActualValue;
UPROPERTY()
float Regeneration;
UFUNCTION()
void Add(float Value);
UFUNCTION()
bool IsEmpty() const;
UFUNCTION()
bool IsFull() const;
UFUNCTION()
void ResetValueMax(float NewMax);
UFUNCTION()
void MakeAsCooldown(float NewMax = 0.0f);
};