Hi forum, i try to create a list for cosmetic purposes with UEnum, but i afraid is very buggy and tricky!
this is my code for my enum:
UENUM(BlueprintType)
enum class EVideoDevices : uint8
{
yes,
};
and now in the costructor of my class i manage that enum to list my own custom list
if (fsDevicesNames.Num() > 0)
{
TArray<FName> fnDevicesNames;
for (int i = 0; i < fsDevicesNames.Num(); i++)
{
FName deviceName = FName(*fsDevicesNames*);
fnDevicesNames.Add(deviceName);
}
if (fnDevicesNames.Num() > 0)
{
UEnum* pEnum = FindObject<UEnum>(ANY_PACKAGE, TEXT("EVideoDevices"), true);
if (pEnum)
{
//fnDevicesNames.Add("Default");
fnDevicesNames.Add("cam2");
pEnum->SetEnums(fnDevicesNames, UEnum::ECppForm::Regular);
}
}
}
as you can see i add some enum names manually, is work perflectly but seems very bug in the editor, when i create a UProperty() in order to see in the editor i cant switch between elements on that enum, is very weird, if a try a short FName i can change in the editor, but when use a long FName now cant
in my test i can switch between default and cam2 but i cant choose microsoft life bla bla, seems because is a very long name, i am doing something wrong?