Hi,
I need to have a UPROPERTY(EditAnywhere, BlueprintReadWrite) with a data type similar to an array, but referred to by a name/string rather than an index. Not sure what the best way to go about this is.
In the blueprint editor I should be able to make a bunch of FMeshItem 's and give them a name and USkeletalMesh*, for example “Sword” and then chuck the sword skeletal mesh in there. This becomes a lot more important when I change the character’s sword item and it’s why I don’t want to refer to it as an array. This way when I break the array/list/whatever it’ll give me “Sword” or other.
I have this:
USTRUCT()
struct FMeshItem
{
GENERATED_USTRUCT_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Merger")
FString Name;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Merger")
USkeletalMesh *Mesh;
};
And I have this:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Merger")
*..an array/list..*<FMeshItem> MeshPieces;
Thanks for any help. I’m just trying to find the best way to go about this.