我如何使用UProperties获取和编辑TArray内部的Struct内部的FString

时间:2019-06-28 14:47:52

标签: c++11 unreal-engine4

我有以下结构:

USTRUCT(BlueprintType)
struct FBaseCreateEditVariable {

    GENERATED_USTRUCT_BODY()
public:
    FBaseCreateEditVariable() {}
    UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (DisplayName = "variableName"))
        FString variableName = "";
    UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (DisplayName = "variableValue"))
        FString variableValue = "";

};

USTRUCT(BlueprintType)
struct FCreateEditVariable : public FInteractStruct {

    GENERATED_USTRUCT_BODY()
public:
    FCreateEditVariable() {}

    UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (DisplayName = "variables"))
        TArray<FBaseCreateEditVariable> variables;

};

所以,如果我有这两个变量:

UArrayProperty* arrayProp; //The property "variables" inside "FCreateEditVariable" struct
void * dir2; //The address of "variables"'s parent ("FCreateEditVariable")

如何获取以及如何使用Uproperty和“ for / while”动态地编辑FBaseCreateEditVariable中的所有FString属性(可以大于这两个FString变量)?

0 个答案:

没有答案