|
1 | 1 | #include "EcsactEditor.h" |
2 | 2 | #include "Async/Async.h" |
3 | 3 | #include "Async/TaskGraphInterfaces.h" |
| 4 | +#include "CoreGlobals.h" |
| 5 | +#include "EcsactUnreal/Ecsact.h" |
4 | 6 | #include "Editor.h" |
5 | 7 | #include "Engine/GameViewportClient.h" |
6 | 8 | #include "ISettingsModule.h" |
@@ -86,13 +88,6 @@ static auto GetDirectoryWatcher() -> IDirectoryWatcher* { |
86 | 88 | return watcher.Get(); |
87 | 89 | } |
88 | 90 |
|
89 | | -static auto GetAllEcsactFiles() -> TArray<FString> { |
90 | | - auto& fm = FPlatformFileManager::Get().GetPlatformFile(); |
91 | | - auto files = TArray<FString>{}; |
92 | | - fm.FindFilesRecursively(files, *SourceDir(), TEXT(".ecsact")); |
93 | | - return files; |
94 | | -} |
95 | | - |
96 | 91 | auto FEcsactEditorModule::SpawnEcsactCli( |
97 | 92 | const TArray<FString>& Args, |
98 | 93 | FOnReceiveLine OnReceiveLine, |
@@ -618,6 +613,19 @@ auto FEcsactEditorModule::OnEcsactSettingsModified() -> bool { |
618 | 613 | return true; |
619 | 614 | } |
620 | 615 |
|
| 616 | +auto FEcsactEditorModule::Get() -> FEcsactEditorModule& { |
| 617 | + return FModuleManager::Get().GetModuleChecked<FEcsactEditorModule>( |
| 618 | + "EcsactEditor" |
| 619 | + ); |
| 620 | +} |
| 621 | + |
| 622 | +auto FEcsactEditorModule::GetAllEcsactFiles() -> TArray<FString> { |
| 623 | + auto& fm = FPlatformFileManager::Get().GetPlatformFile(); |
| 624 | + auto files = TArray<FString>{}; |
| 625 | + fm.FindFilesRecursively(files, *SourceDir(), TEXT(".ecsact")); |
| 626 | + return files; |
| 627 | +} |
| 628 | + |
621 | 629 | #undef LOCTEXT_NAMESPACE |
622 | 630 |
|
623 | 631 | IMPLEMENT_MODULE(FEcsactEditorModule, EcsactEditor) |
0 commit comments