Files
UnrealEngine/Samples/Games/Lyra/Plugins/GameSettings/Source/Public/DataSource/GameSettingDataSource.h
2025-05-18 13:04:45 +08:00

32 lines
915 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Delegates/Delegate.h"
class ULocalPlayer;
//--------------------------------------
// FGameSettingDataSource
//--------------------------------------
class FGameSettingDataSource : public TSharedFromThis<FGameSettingDataSource>
{
public:
virtual ~FGameSettingDataSource() { }
/**
* Some settings may take an async amount of time to finish initializing. The settings system will wait
* for all settings to be ready before showing the setting.
*/
virtual void Startup(ULocalPlayer* InLocalPlayer, FSimpleDelegate StartupCompleteCallback) { StartupCompleteCallback.ExecuteIfBound(); }
virtual bool Resolve(ULocalPlayer* InContext) = 0;
virtual FString GetValueAsString(ULocalPlayer* InContext) const = 0;
virtual void SetValue(ULocalPlayer* InContext, const FString& Value) = 0;
virtual FString ToString() const = 0;
};