I may be missing something here, where would the UENUM and USTRUCT go? Should I use an empty class to hold them?
Update: I used an empty class, though the GetAttitude function is being a bit problematic on compile:
Settings.cpp(23) : error C2440: 'initializing': cannot convert from 'const TArray<FTeamAttitude,FDefaultAllocator>' to 'TArray<FTeamAttitude,FDefaultAllocator> &'
Settings.cpp(23): note: Conversion loses qualifiers
Settings.cpp(29) : error C2440: 'initializing': cannot convert from 'TArray<TEnumAsByte<ETeamAttitude::Type>,FDefaultAllocator>' to 'FTeamAttitude &'
Settings.cpp(30) : error C2039: 'IsValidIndex': is not a member of 'FTeamAttitude'
Custom.h(34): note: see declaration of 'FTeamAttitude'
Settings.cpp(32) : error C2676: binary '': 'FTeamAttitude' does not define this operator or a conversion to a type acceptable to the predefined operator
If I change
TArray<FTeamAttitude> & teamAttitudes = UPsychiatrixSettings::Get()->TeamAttitudes;
to
TArray<FTeamAttitude> teamAttitudes = UPsychiatrixSettings::Get()->TeamAttitudes;
I get:
Settings.cpp(29) : error C2440: 'initializing': cannot convert from 'TArray<TEnumAsByte<ETeamAttitude::Type>,FDefaultAllocator>' to 'FTeamAttitude &'
Settings.cpp(30) : error C2039: 'IsValidIndex': is not a member of 'FTeamAttitude'
Custom.h(34): note: see declaration of 'FTeamAttitude'
Settings.cpp(32) : error C2676: binary '': 'FTeamAttitude' does not define this operator or a conversion to a type acceptable to the predefined operator
I have a feeling I’m missing something here.