You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
-Multi-User support added -Changing variable values in dialogue will call SendConsoleVariableChange -If the user is tracking changed variables from outside the dialogue, this will also call SendConsoleVariableChange so all clients will begin tracking it as well -Added IsInitialized returning bool to FManager so that MU UI can be generated based on whether or not the Concert plugin is enabled -Fix for: Some variables that don't trigger the sink delegate when changed outside the CVE dialogue -Fixed issue where "FindSavedValueByCommandString" always returned false even when a value was found -Removed redundant Settings functions from FConsoleVariablesEditorModule #jira UE-133151 #jira UETOOL-4551 #ROBOMERGE-AUTHOR: jared.therriault #ROBOMERGE-SOURCE: CL 18266887 in //UE5/Release-5.0/... via CL 18266899 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469) [CL 18266902 by jared therriault in ue5-release-engine-test branch]
56 lines
1.5 KiB
C++
56 lines
1.5 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "ConsoleVariablesAsset.h"
|
|
|
|
#include "ConsoleVariablesEditorCommandInfo.h"
|
|
|
|
#include "Algo/Find.h"
|
|
|
|
void UConsoleVariablesAsset::SetVariableCollectionDescription(const FString& InVariableCollectionDescription)
|
|
{
|
|
VariableCollectionDescription = InVariableCollectionDescription;
|
|
}
|
|
|
|
void UConsoleVariablesAsset::ReplaceSavedCommandsAndValues(const TMap<FString, FString>& InMap)
|
|
{
|
|
SavedCommandsAndValues = InMap;
|
|
}
|
|
|
|
bool UConsoleVariablesAsset::FindSavedValueByCommandString(const FString& InCommandString, FString& OutValue) const
|
|
{
|
|
TArray<FString> KeyArray;
|
|
SavedCommandsAndValues.GetKeys(KeyArray);
|
|
|
|
if (const bool bMatchFound = KeyArray.Contains(InCommandString))
|
|
{
|
|
OutValue = SavedCommandsAndValues[InCommandString];
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
void UConsoleVariablesAsset::AddOrSetConsoleVariableSavedValue(const FString& InCommandString, const FString& InNewValue)
|
|
{
|
|
SavedCommandsAndValues.Add(InCommandString, InNewValue);
|
|
}
|
|
|
|
bool UConsoleVariablesAsset::RemoveConsoleVariable(const FString& InCommandString)
|
|
{
|
|
TArray<FString> KeyArray;
|
|
SavedCommandsAndValues.GetKeys(KeyArray);
|
|
|
|
if (const bool bMatchFound = KeyArray.Contains(InCommandString))
|
|
{
|
|
return SavedCommandsAndValues.Remove(InCommandString) > 0;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
void UConsoleVariablesAsset::CopyFrom(UConsoleVariablesAsset* InAssetToCopy)
|
|
{
|
|
VariableCollectionDescription = InAssetToCopy->VariableCollectionDescription;
|
|
SavedCommandsAndValues = InAssetToCopy->SavedCommandsAndValues;
|
|
}
|