I created a new project to create some custom animation nodes.
For these animation nodes to work, the editor module loading phase needs to be PreDefault.
{
"Name": "RBAnimResearchEditor",
"Type": "Developer",
"LoadingPhase": "PreDefault"
}
No worries there.
Later, I added a added a marketplace plugin that adds its own custom animation node, and thus also needs its loading phase set to PreDefault.
{
"Name": "MirrorAnimationSystemEditor",
"Type": "Editor",
"LoadingPhase": "PreDefault",
"BlacklistPlatforms": [
"IOS"
]
}
Both work in editor, but upon restarting, the engine fails to fine /Script/MirrorAnimationSystemEditor in time, since the game module is loaded before the plugin.
Tracked the issue down to FEngineLoop::LoadStartupModules():
bool FEngineLoop::LoadStartupModules()
{
FScopedSlowTask SlowTask(3);
SlowTask.EnterProgressFrame(1);
// Load any modules that want to be loaded before default modules are loaded up.
if (!IProjectManager::Get().LoadModulesForProject(ELoadingPhase::PreDefault) || !IPluginManager::Get().LoadModulesForEnabledPlugins(ELoadingPhase::PreDefault))
{
return false;
}
If I load the plugins BEFORE the game module, the problem is solved:
bool FEngineLoop::LoadStartupModules()
{
FScopedSlowTask SlowTask(3);
SlowTask.EnterProgressFrame(1);
// Load plugins BEFORE game module.
// Load any modules that want to be loaded before default modules are loaded up.
if (!IPluginManager::Get().LoadModulesForEnabledPlugins(ELoadingPhase::PreDefault) || !IProjectManager::Get().LoadModulesForProject(ELoadingPhase::PreDefault))
{
return false;
}
I was unable to come across any mention of this issue thus far.
If this doesn’t cause any issues with the our proper project (packaged or otherwise), I’ll make a PR for it.
Please note that I checked FEngineLoop::LoadStartupModules() in the UE4.17.1 release and it is the same as UE4.16.
Thanks.