Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed enum to wrong string cause by misuse GetNameStringByValue and GetNameStringByIndex #4817

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static FString PropSizeTypeToString(EPropSize PropSizeType)
{
return FString("unknown");
}
return ptr->GetNameStringByIndex(static_cast<int32>(PropSizeType));
return ptr->GetNameStringByValue(static_cast<int32>(PropSizeType));
}

static EPropSize StringToPropSizeType(FString PropSize)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ FString CityMapMeshTag::ToString(ECityMapMeshTag Tag)
const UEnum* ptr = FindObject<UEnum>(ANY_PACKAGE, TEXT("ECityMapMeshTag"), true);
if(!ptr)
return FString("Invalid");
return ptr->GetNameStringByIndex(static_cast<int32>(Tag));
return ptr->GetNameStringByValue(static_cast<int32>(Tag));
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ FString QualityLevelToString(EQualityLevel QualitySettingsLevel)
{
return FString("Invalid");
}
return ptr->GetNameStringByIndex(static_cast<int32>(QualitySettingsLevel));
return ptr->GetNameStringByValue(static_cast<int32>(QualitySettingsLevel));
}

static void LoadSettingsFromConfig(
Expand Down