[ad_1]
I am utilizing the IDirectoryWatcher module on my venture to observe modifications on a listing and when packaging it, I bumped into a lot of points.
Try 1:
If I merely add the #embody "DirectoryWatcherModule.h"
and #embody "IDirectoryWatcher.h"
to my .cpp recordsdata, the sport within the editor works high quality however I get the next error:
C:Customers[…]Unreal
ProjectsMDVProject4MDVProject4SourceMDVProject4ControllerAMyController.h(6):
deadly error C1083: Can not open embody file: ‘IDirectoryWatcher.h’: No
such file or listing
Try 2:
If I add the module to the .Construct.cs file as follows:
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "EnhancedInput", "DirectoryWatcher" });
the sport works high quality within the editor however exhibits the next error when packaging:
Lacking precompiled manifest for ‘DirectoryWatcher’, ‘C:Program
FilesEpic
GamesUE_5.3EngineIntermediateBuildWin64UnrealGameDevelopmentDirectoryWatcherDirectoryWatcher.precompiled’.
This module was most probably not flagged for being included in a
precompiled construct – set ‘PrecompileForTargets =
PrecompileTargetsType.Any;’ in DirectoryWatcher.construct.cs to override.
If a part of a plugin, additionally examine if its ‘Sort’ is right.
Word: I attempted including the module with DynamicallyLoadedModuleNames.Add("DirectoryWatcher");
, however acquired the identical error.
Try 3:
Now issues get humorous. I am unable to add the module and with out it, it doesn’t appear to search out it. So I took the DirectoryWatcher folder from the engine and copied it into the Plugins folder of my venture. The .Construct.cs module added in try 2 was eliminated.
I modified the contains to#embody "../../MDVProject4/Plugins/DirectoryWatcher/Public/IDirectoryWatcher.h"
and#embody "../../MDVProject4/Plugins/DirectoryWatcher/Public/DirectoryWatcherModule.h"
to ensure the code used is that of my Plugin folder and never the one from the engine.
With this the sport works high quality within the editor and may bundle, however I get a black display with the next error when opening the .exe file:
Assertion failed: Module
[File:D:build++UE5SyncEngineSourceRuntimeCorePrivateModulesModuleManager.cpp]
[Line: 397] DirectoryWatcher
Trying on the logs, I can see that it factors to a selected line on my code that accommodates:
FDirectoryWatcherModule &DirectoryWatcherModule = FModuleManager::LoadModuleChecked<FDirectoryWatcherModule>(TEXT("DirectoryWatcher"));
IDirectoryWatcher* DirectoryWatcher = DirectoryWatcherModule.Get();
The rationale for it’s because regardless of the IDirectoryWatcher
and FDirectoryWatcherModule
class getting used is the one from the Plugin folder, for some purpose the Get()
technique getting used is the one from the engine.
I then tried some nasty issues that I cannot go into element however the challenge persists.
Unreal Engine model 5.3. Packaging mode used Developer.
I am conscious the IDirectoryWatcher module is contained in the Developer folder (/Engine/Supply/Developer
), however I might count on a Developer packaging mode to work with it.
How can I repair this?
[ad_2]