AnimGraphNode not loading in none packaged test builds

I’ve run across and worked around a problem with AnimGraphNodes not loading.

For custom AnimNodes, there is the runtime AnimNode, plus the corresponding editor AnimGraphNode. I have that separation working correctly, with the custom AnimNodes working perfectly in packaged builds.

Where I ran into a problem was when testing multiplayer, so using shortcuts to run from a project in different modes - emulating a server, emulating a client etc. These were running from the normal development project, so not using cooked content, however the editor module containing the AnimGraphNodes is not being loaded by Unreal in some cases, resulting in the animation blueprints using those nodes not working.

I’ve worked around this my manually loading the required modules from my game module, if the compiled version supports WITH_EDITOR, whether it is running including editor support or not.

class FDuRaGameModule : public FDefaultGameModuleImpl
{
#if	WITH_EDITOR
	virtual void StartupModule() override
	{
		FModuleManager::Get().LoadModule(TEXT("BlueprintGraph"));
		FModuleManager::Get().LoadModule(TEXT("AnimGraph"));
		FModuleManager::Get().LoadModule(TEXT("DuRaEditor"));
	}
#endif
};

IMPLEMENT_PRIMARY_GAME_MODULE(FDuRaGameModule, DuRa, "DuRa");

This works, but doesn’t feel like a great approach.

Is there a different recommendation for the editor module setup for a module containing AnimGraphNodes so that the module will be automatically loaded under all circumstances when required?

We’re in the process of making our custom AnimNodes a plugin - would not want to have every project using them to have to manually load the editor module to ensure the nodes work under all development configurations.

This seems like the best approach to me but I’m going to ask around to see if there may be a better solution. Thank you for reporting this issue in either case.

I haven’t been able to find any other solutions so I would suggest continuing to do what you’re doing.

Okay, thank you.