Hello,
I have a struct array on my character
UPROPERTY(EditAnywhere)
TArray<struct FSlotsAtDistance> AttackSlotDistances;
I populate the array in my blueprint defaults. All works well in the editor and mobile preview. However when I run the game on my device (Galaxy S5). The array is empty?
UE_LOG(LogElemental, Log, TEXT(" SlotDistances: %d"),Owner->AttackSlotDistances.Num());
Returns 3 in the editor, and mobile preview but 0 on the device.
Can’t for the life of my figure out why? What makes it even weirder is that I have another TArray of structs, populated in defaults on my character, that’s retained as expected on the device!
Here’s the struct for reference
USTRUCT()
struct FSlotsAtDistance
{
GENERATED_USTRUCT_BODY()
UPROPERTY(EditAnywhere, Category=AttackSlotData)
float SlotCount;
UPROPERTY(EditAnywhere, Category = AttackSlotData)
float Distance;
FSlotsAtDistance()
{
SlotCount = 0;
Distance = 0;
};
FSlotsAtDistance(float Count, float Dist)
{
SlotCount = Count;
Distance = Dist;
}
};