Hi.
I created simple AHUD derived class with UStruct, created a blueprint based on it, populated this Ustruct in the editor. In mobile preview it works nicely, but on real device (iPad Air) struct fields just got cleared. Please take a look.
UE 4.3.0, Launcher based
Mac OS X 10.9.4
Xcode 5.1.1
iPad Air, iOS 7.1.2
header:
USTRUCT()
struct FDebugButton
{
GENERATED_USTRUCT_BODY()
/** */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Buttons)
FString Name;
/** */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Buttons)
int32 ButtonValue;
};
UCLASS(Blueprintable)
class BATTLEMAGE_API ABattlemageDebugHUD : public AHUD
{
GENERATED_UCLASS_BODY()
/** Debug buttons */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Buttons)
TArray<FDebugButton> Buttons;
virtual void BeginPlay() override;
}
source:
void ABattlemageDebugHUD::BeginPlay()
{
for (auto& CurrentButton : Buttons)
{
FString DebugText = FString::Printf(TEXT("Button value: %u, Name: "), CurrentButton.ButtonValue) + CurrentButton.Name;
GEngine->AddOnScreenDebugMessage(-1, 30.0f, FColor::Green, DebugText);
}
}
Editor:
https://dl.dropboxusercontent.com/u/83133453/Buttons.png
Mobile preview:
https://dl.dropboxusercontent.com/u/83133453/MobilePreview.png
Device:
https://dl.dropboxusercontent.com/u/83133453/Device.jpg
Sorry for my bad English.