# How to set up the plugin for multiple modules

**URL:** <https://forums.unrealengine.com/t/how-to-set-up-the-plugin-for-multiple-modules/1804873>\
**Category:** Programming & Scripting\
**Tags:** modules, unreal-engine, Plugins, question, CPP\
**Created:** [April 15, 2024, 2:41pm UTC](https://forums.unrealengine.com/t/how-to-set-up-the-plugin-for-multiple-modules/1804873 "2024-04-15T14:41:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bssnake](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bssnake/32/913032_2.png) [@Bssnake](https://forums.unrealengine.com/u/Bssnake)\
**Post date:** [April 15, 2024, 2:41pm UTC](https://forums.unrealengine.com/t/how-to-set-up-the-plugin-for-multiple-modules/1804873/1 "2024-04-15T14:41:20Z")

</div>

Allow me to use someone else’s structural diagram

```auto
+Project
   + Plugins
      + MyPlugin
         + Source
            + Developer
               + Module1
               + Module2
               + ......
            + Editor
               + Module3
               + Module4
            + ThirdParty
               + Module5
               + Module6

```

The file is structured like this.  
Generate VS project files gives me an error when I add the relevant module to .uplugin:

```auto
Exception while generating include data for ProjectEditor: Could not find definition for module 'Module1', (referenced via default plugins -> Plugins.uplugin)

```

When I move the module to the top level folder, it works fine.

```auto
+Project
   + Plugins
      + MyPlugin
         + Source
            + Module1

```

I’m sure I’m doing something wrong somewhere, but I don’t know what it is, so I’m asking for help.  
The modules all have .Build.cs / Module.cpp.  
Module.cpp has also added the

```auto
IMPLEMENT_MODULE(FDefaultModuleImpl, Module1);

```

---

<div class="post-metadata">

**Author:** ![Bssnake](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bssnake/32/913032_2.png) [@Bssnake](https://forums.unrealengine.com/u/Bssnake)\
**Post date:** [April 16, 2024, 1:58am UTC](https://forums.unrealengine.com/t/how-to-set-up-the-plugin-for-multiple-modules/1804873/2 "2024-04-16T01:58:05Z")

</div>

HI, I found the solution:

```auto
Comment out the other modules in .uplugin, "Generate VS project files" once.
Close the plugin and "Generate VS project files" again.
With the plugin closed, go to .sln and edit the .uplugin again, then UBT will find the Modules successfully.

```

This is a really strange problem.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [May 16, 2024, 1:58am UTC](https://forums.unrealengine.com/t/how-to-set-up-the-plugin-for-multiple-modules/1804873/3 "2024-05-16T01:58:29Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
