I am creating a simple RPG game which uses dice rolls to determine weapon damage (eg. 2d6). I created a custom class RollValue which has two member variables:
- (int) rolls
- (enum) dice type
I also have a weapon data asset class called Weapon (inherits from UDataAsset) which contains a member variable of type RollValue.
- (string) item name (eg. “dagger”)
- (int) gold value (eg. 2)
- (class: RollValue) damage roll (eg. 2d4)
When I create a data asset such as “dagger”, I would like to be able to see the variables of the RollValue of the Weapon data asset. Unfortunately, I’m unable to do this since UPROPERTY does not work with custom classes.
How would I go about making the RollValue class drawable inside the weapon data assets?