When I cook or package, I’ve got a warning about initialization of struct member.
LogInit: Display: LogClass: Warning: FKCharacterAlteration::Guid is not initialized properly
LogInit: Display: LogAutomationTest: Warning: FKCharacterAlteration::Guid is not initialized properly
The Guid member var is FGuid type.
USTRUCT(BlueprintType)
struct FKCharacterAlteration
{
GENERATED_USTRUCT_BODY()
public:
/** @brief Unique identifier for this alteration */
UPROPERTY()
FGuid Guid;
/** @brief The alteration type. */
UPROPERTY(EditDefaultsOnly, Category = "Alterations")
EKCharacterAlterationTypeEnum AlterationType;
/** @brief The alteration value. */
UPROPERTY(EditDefaultsOnly, Category = "Alterations")
float Value;
/** @brief The alteration duration. */
UPROPERTY(EditDefaultsOnly, Category = "Alterations")
float Duration;
/** @brief timestamp for removing message */
UPROPERTY()
float HideTime;
/** @brief Last hit time. */
UPROPERTY()
float HitTime;
private:
/** A rolling counter used to ensure the struct is dirty and will replicate. */
UPROPERTY()
uint8 EnsureReplicationByte;
public:
/** @brief Initialize defaults.
*/
FKCharacterAlteration()
: AlterationType(EKCharacterAlterationTypeEnum::KCA_Undefined)
, Value(0.f)
, Duration(0.f)
, HideTime(0.f)
, HitTime(0.f)
, EnsureReplicationByte(0)
{
Guid = FGuid::NewGuid();
}
/**
* @brief Constructor.
*
* @param alterationGuid The unique identifier for the alteration.
* @param alterationType Type of the alteration.
* @param time The time.
* @param value The value of the alteration.
* @param duration The duration.
*/
FKCharacterAlteration(const FGuid& alterationGuid, EKCharacterAlterationTypeEnum alterationType, float time = 0.0f, float value = 0.0f, float duration = 0.0f)
: Guid(alterationGuid)
, AlterationType(alterationType)
, Value(value)
, Duration(duration)
, HideTime(time + duration)
, HitTime(time)
, EnsureReplicationByte(0)
{
Guid = alterationGuid;
}
.....
}
How can I get rid of this warning message?
Txs,
D.