x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Two modules in one plugin

Hello,

Is it possible to have two (or more) modules in one plugin and if yes, how is it done?

I have found mentions that say it's possible, but nothing concrete and everything I've tried ended in errors.

Background is that I want to create a plugin that relies heavily on an already existing plugin from the marketplace (the licences cover that as far as I know. Please correct me if I'm wrong). But having plugins depend on other plugins seems to be discouraged, so I want to merge them into one. Is that possible?

Thank you very much in advance.

Product Version: UE 4.13
Tags:
more ▼

asked Aug 09 '17 at 08:15 PM in C++ Programming

avatar image

Rayaki Ca Tocha
1 1 2 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Yes, you can have any number of modules per plug-in. Create one sub-folder within the plug-in's Source directory for each module. The names of the sub-folders are the names of the modules. In your plug-in's .uplugin file you then add the various modules to the "Modules" section.

You can find many examples in the UE4 code base under /Engine/Plugins. Most of the included plug-ins have multiple modules.

more ▼

answered Aug 10 '17 at 02:04 AM

avatar image Rayaki Ca Tocha Aug 10 '17 at 12:02 PM

Thanks for the quick answer but i cant get it to work.

(Edit: I'm very sorry but I can't seem to get this into a more readable form.)

I tried copying the folder over so my file tree in Plugins/* now looks like:

|-TestPlugin/

| |-TestPlugin.uplugin

| |-Source/

| | |-TestPlugin/

| | | |-TestPlugin.Build.cs

| | | |-Private/

| | | |-Public/

| | |-DonAINavigation

| | | |-DonAINavigation.Build.cs

| | | |-Classes/

| | | |-Private/

| | | |-Public/

The DonAINavigation folder is from the marketplace plugin.

In the uplugin file I added the module so it looks like this:

{
"FileVersion": 3,
"Version": 1,
"VersionName": "1.0",
"FriendlyName": "TestPlugin",
"Description": "",
"Category": "Other",
"CreatedBy": "",
"CreatedByURL": "",
"DocsURL": "",
"MarketplaceURL": "",
"SupportURL": "",
"EnabledByDefault": true,
"CanContainContent": false,
"IsBetaVersion": false,
"Installed": false,
"Modules": [
{
"Name": "TestPlugin",
"Type": "Runtime",
"LoadingPhase": "Default"
},
{
"Name": "DonAINavigation",
"Type": "Runtime",
"LoadingPhase": "Default"
}
]
}

When I try to rebuild the solution it gives me two errors(they are in German so it might not be the exact english ones): System.UnauthorizedAccessException: Denied access to "F:\Dokumente\Unreal Projects\MyProject3\Plugins\TestPlugin\Binaries\Win64\UE4Editor-TestPlugin.dll" and MSB3073 The command "C:\Program Files\Epic Games\UE_4.13\Engine\Build\BatchFiles\Reuild.bat" MyProject3Editor Win64 Development "F:\Dokumente\Unreal Projects\MyProject3\MyProject3.uproject" -waitmutex exited with code -1.

What am I missing?

avatar image Rayaki Ca Tocha Aug 10 '17 at 12:50 PM

Ignore that last comment. I got it to work. (I feel a bit stupid now) I tried to rebuild the solution but I had to "Start Without debugging"(Ctrl+F5) and building the binaries again and then hitting "Build Solution" (Ctrl+Shift+B). (I'm writing this down, in case someone else gets stumped on this.)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I have got into a similar problem recently, (I know it is an old question, but maybe someone may fall into the same situation)

Your directory structure are ok, but it is missing the classes that instantiate your modules. In your case you need a TestPlugin.h and TestPlugin.cpp along with the TestPlugin.Build.cs, and the same applies to DonAiNavigation.

You can take a look in any other module implementation to check how is it done but it is mostly like:

 #include "<plugin_name>.h"
 #include "Modules/ModuleManager.h"
 
 IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, <plugin_name>, "<plugin_name>" );


hope that helps

more ▼

answered Jul 22 '18 at 09:03 PM

avatar image

Iotti
524 1 4 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question