Array of values based on an enum.
I'm trying to make a data table with an array of floats based on an enum size. Let me explain. I have damage types:
This displays just fine in the editor and blueprints and such. I want to have what is essentially a TMap or TArray of TPairs that has the element type and a float value associated with it (for amount of damage and amount of resistances and whatnot). However, TMaps and TPairs are not supported by UPROPERTY.
That leads to a compilation error, as does a TMap, saying only UCLASS, USTRUCT or UENUM types are accepted.
Going forward, I see two options:
Does anyone see a solution that I'm missing?
asked Apr 23 '16 at 06:20 AM in C++ Programming
You can't use your own macros with macros and structures where used this macros for reflection system. It's part of UnrealHeaderTool. You prevent the program.
And templates can't be used. Only pure USTRUCTs without anything foreign macros and templates.
You can wrote your own wrapper with TArray UPROPERTY inside to manage data type by enum value indexing.
Follow this question
Once you sign in you will be able to subscribe for any updates here