Live Config
Loading...
Searching...
No Matches
LiveConfigEditorSubsystem.h
1// Copyright (c) 2026 Nicholas Arthur
2// Licensed under the MIT License
3
4#pragma once
5
6#include "CoreMinimal.h"
7#include "EditorSubsystem.h"
8#include "LiveConfigTypes.h"
9#include "LiveConfigEditorSubsystem.generated.h"
10
12class SNotificationItem;
13struct FFileChangeData;
14
19UCLASS()
20class LIVECONFIGEDITOR_API ULiveConfigEditorSubsystem : public UEditorSubsystem
21{
22 GENERATED_BODY()
23
24public:
25
26 virtual void Initialize(FSubsystemCollectionBase& Collection) override;
27 virtual void Deinitialize() override;
28
29 void MonitorCsv(const FString& Path);
30
31private:
32 void EndMonitorCsv();
33
34 void UpdateCsvMonitor();
35
36 void HandleLiveConfigSettingsChanged(UObject* Settings, FPropertyChangedEvent& PropertyChangedEvent);
37
39 void HandleSyncDetected(const TArray<FLiveConfigPropertyDefinition>& ChangedProps);
40
42 void ShowSyncedChangesNotification(const TArray<FLiveConfigPropertyDefinition>& ChangedProps);
43
45 void ShowSyncPromptNotification(const TArray<FLiveConfigPropertyDefinition>& ChangedProps);
46
48 void OnFileChanged(const TArray<FFileChangeData>& FileChanges);
49
50 TWeakPtr<SNotificationItem> SyncNotification;
51
52 TArray<FLiveConfigPropertyDefinition> LastIgnoredChanges;
53
54 FDelegateHandle FileWatcherHandle;
55 FString TargetCsvPath;
56};
Definition LiveConfigEditorSubsystem.h:21
Definition LiveConfigUserSettings.h:17