Learning-Agents with C++ in UE 5.7.1 LearningAgentsPPOTrainer derived class will not build

Hello and merry chistmas :stuck_out_tongue:

I was creating a new blank C++ Project in UE 5.7.1 and enabled the Learning-Agents Plugin.

When i tried to add a C++ class with parent class LearningAgentsPPOTrainer, the class won’t build.

Error log of UE shows that an include statement cannot be resolved.

E:\Program Files\Epic Games\UE_5.7\Engine\Plugins\Experimental\LearningAgents\Source\LearningAgentsTraining\Public\LearningAgentsTrainer.h(5,1): fatal error C1083: Cannot open include file: ā€˜LearningTrainer.h’: No such file or directory

The ā€œmissingā€ file seems to be part of another directory in the LearningAgents plugin folder. I dont know much about the correct usage of the Build.cs files in those directories, but as far as i can see it, the ā€œLearningTrainingā€ Module, which holds the ā€œunfindableā€ file, is included in the PrivateDependencyModuleNames of the ā€œLearningAgentsTrainingā€ module, where the error message originates from, so should work ?

I tried messing with the Build.cs files to achieve something but i was not sucessfull, building in Visual Studio with F7.

I dont know how to proceed at this point and would appreciate any help.

Hello, i just found a solution myself, I was just adding ā€œLearningTrainingā€ to the PrivateDependencyModuleNames in my projects Build.cs.

I dont know if it’s a workaround or the supposed way to do it, but it works anyway.

bye