How to let a module compiles only in Editor build?

Hi Jonathan:

The solution should be fine, but some other questions came to my mind, I hope you can help me again:

  1. Just want to make sure these codes are to be added in MyProj.Build.cs, right?
  2. If I add these codes, then MyModule would be compiled if I’m building the editor version of MyProj, but I can’t specify which editor version. Is there any method to make MyModule only compiles for certain build configuration, I mean the configuration like Development Editor+Win64. Maybe I only want to build MyModule for Debug build or maybe some custom added configuration?
  3. I’m adding codes like OutExtraModuleNames.Add("MyModule") in the MyProjEditor.Target.cs right now, is this the same thing?
  4. Is there any documentation explaining how things like PrivateDependencyModuleNames work? There are so many of them and the only documentation is the comment of these variables, it would be great if any more detailed explanation (maybe with example use) exist.

Thanks.
Marson