RealtimeStyleTransferRuntime/Plugins/GameSettings/Source/Private/Widgets/GameSettingDetailExtension.cpp

27 lines
718 B
C++
Raw Normal View History

2022-05-23 18:41:30 +00:00
// Copyright Epic Games, Inc. All Rights Reserved.
#include "Widgets/GameSettingDetailExtension.h"
#include "GameSetting.h"
void UGameSettingDetailExtension::SetSetting(UGameSetting* InSetting)
{
NativeSettingAssigned(InSetting);
}
void UGameSettingDetailExtension::NativeSettingAssigned(UGameSetting* InSetting)
{
if (Setting)
{
Setting->OnSettingChangedEvent.RemoveAll(this);
}
Setting = InSetting;
Setting->OnSettingChangedEvent.AddUObject(this, &ThisClass::NativeSettingValueChanged);
OnSettingAssigned(InSetting);
}
void UGameSettingDetailExtension::NativeSettingValueChanged(UGameSetting* InSetting, EGameSettingChangeReason Reason)
{
OnSettingValueChanged(InSetting);
}