1) Limitation of GetOptions being effectively “static” per property declaration
I’m using UPROPERTY’s meta = (GetOptions = …) to control which values are shown in the editor, and it works well.
However, it seems like GetOptions is bound statically to the property declaration, which makes it hard to vary per derived type.
For example, if I have a base struct FStrutctA and multiple derived structs FStructB, FStructC, FStructD, I’d like the same inherited property (NameA) to show different option lists depending on the derived struct type.
Currently, there’s no way (that I know of) to override the GetOptions metadata for an inherited property, so I end up duplicating the property in each derived struct just to assign a different GetOptions function—hurting maintainability.
Is there any plan to support a more dynamic / override-friendly approach for GetOptions, such as allowing the options provider to depend on the owning struct type (or to be overridden in derived structs)?
Example :
USTRUCT(BlueprintType)
struct FStructA
{
UPROPERTY(EditDefaultsOnly, meta = (GetOptions = "GetOptions_NameA"))
FName NameA;
};
USTRUCT(BlueprintType)
struct FStructB : public FStructA
{
// Need a different GetOptions for NameA
};
USTRUCT(BlueprintType)
struct FStructC : public FStructA
{
// Need a different GetOptions for NameA
};
2) ValidEnumValues is hard to read/maintain when many values are listed
Also, when using meta = (ValidEnumValues = “…”) to restrict which enum entries should appear in the editor, I have to list every allowed enum entry as a long comma-separated string inside the same UPROPERTY macro.
If the allowed set is large, readability and maintainability drop significantly.
Is there any plan to support a cleaner approach, similar to GetOptions, where the allowed enum values can be provided via a function (or otherwise separated/centralized)?
Example :
UPROPERTY(EditDefaultsOnly, meta = (ValidEnumValues =
"Attack, Defense, MoveSpeed, AttackDamage, TakeDamage, MaxHP, "
"BossAttackDamage, BossTakeDamage, GroggyValue, GroggyDamage, "
"CriticalRate, CriticalDamage, TakeCriticalDamage, SkillGaugeChargeEfficiency, "
"SkillDamage, SkillCriticalRate, SkillCriticalDamage, SkillCoolTime, "
"AttackSpeed, WeaponDamage, BurstDuration, BurstGaugeChargeEfficiency, "
"StaminaCost, EffectBeadsEfficiency, InventoryWeight, CaptureRate, "
"RideDuration, BuffDuration, DebuffDuration, BuffEffectiveness, DebuffEffectiveness"))
ESpecificType A;
[Attachment Removed]