unitysamples / LyraStarterGame /Plugins /GameSettings /Source /Private /GameSettingValueDiscrete.cpp
| // Copyright Epic Games, Inc. All Rights Reserved. | |
| //-------------------------------------- | |
| // UGameSettingValueDiscrete | |
| //-------------------------------------- | |
| UGameSettingValueDiscrete::UGameSettingValueDiscrete() | |
| { | |
| } | |
| FString UGameSettingValueDiscrete::GetAnalyticsValue() const | |
| { | |
| const TArray<FText> Options = GetDiscreteOptions(); | |
| const int32 CurrentOptionIndex = GetDiscreteOptionIndex(); | |
| if (Options.IsValidIndex(CurrentOptionIndex)) | |
| { | |
| const FString* SourceString = FTextInspector::GetSourceString(Options[CurrentOptionIndex]); | |
| if (SourceString) | |
| { | |
| return *SourceString; | |
| } | |
| } | |
| return TEXT("<Unknown Index>"); | |
| } | |