Is it possible to add a custom game module as dependency module from an engine module?

I tried adding my game module name into the line “PrivateDependencyModuleNames.AddRange(new string[] { …” of “UnrealLightmass.build.cs” file. And also added the including paths of my game source code. Then, just compiled the UnrealLightmass project, but recieved an error "4>EXEC : error : Couldn’t find module rules file for module ‘MyGame’ ".
How can I resolve this issue? Or, is there a better way to test if external code works properly with engine when modifying the original engine source code, in cases I need to reference some external custom code from original engine code.
Thanks in advance for any help!

Hi, Awesome_Junior_Miss. Sorry for bad English .(
For example. See how created Slate module \Epic Games\4.10\Engine\Source\Runtime\Slate
and module rules in file Slate.Build.cs

It seems like engine can’t find the module rules files. However, the files truly exist, but the engine module didn’t know where they were.

Interesting. Maybe this will help?

https://docs.unrealengine.com/latest/INT/Programming/Modules/Gameplay/index.html

Thank you. I’d resolved it by adding code files directly inside the engine source folders.

I’ve faced the exactly same problem. I’ve added new dependency to the UnrealEd module, but UBT refuces to find my module rules file no matter what I do… Is it even possible?