To reproduce:
- Create a plugin with the EnabledByDefault flag set to true in its .uplugin file and which provides a Runtime module.
- Load game into Editor. Game plays fine in editor.
- Launch game. Launch will fail due to Runtime module not found.
- Package game. Game will not run due to Runtime module not found.
This however works:
- Change plugin to have EnabledByDefault flag set to false.
- In Editor, enter the plugins menu and tick the Enabled flag for the plugin.
- Launch game. Runtime module is correctly bundled into the generated game.
- Package game. Game runs as Runtime module was bundled into the game.
Conclusion:
In your dependency build code for output, the check for whether a plugin is enabled should also check if the plugin has EnabledByDefault set to true. This would solve this bug.
Edit:
You will need a stanza like this in your .uplugin file to see the problem:
"Modules" :
[
{
"Name" : "OculusAudio",
"Type" : "Runtime",
"WhitelistPlatforms" : [ "Win64" ],
"LoadingPhase" : "PostConfigInit"
}
]
In this case the problem will manifest as the module OculusAudio not being linked into the packaged binary output.
Hey Niall-
I created a new project in 4.11.2 and was able to Launch and package the project without any errors after creating a plugin and editing the .uproject file. Can you try to reproduce this in 4.11 as well and if so, please detail each step including the type of project template and the type of plugin added.
Hi Niall,
We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.
Thank you.
Sorry for the late reply, I was presenting at a major software conference, only just back. I’ve added an illustrative stanza above, indeed I’d even suggest try twiddling the OculusAudio plugin to use EnabledByDefault: true and see if the bug replicates.
So, just to be clear, set EnabledByDefault to true for the OculusAudio plugin, create a new project, set some audio to use the OculusAudio HRTF, package it and execute the output. You should see the missing module error.
I’m still unable to reproduce the behavior you’re referring to. Here are the steps that I’ve used:
- Create a new code project
- Add a new Blank Plugin
- Open the NewPlugin.uproject and set EnabledByDefault to true
- Also in NewPlugin.uproject change the Type from Developer to Runtime, Change the loadingPhase from Default to PostConfigInit, and add the WhitelistPlatforms line.
- Save the .uproject and run Generate Project Files for the Project.uproject
- Relaunch the project
At this point I was able to PIE as well as Launch the game and packaged for Win64. Can you explain what type of plugin you’re creating or where my steps differ from what you’ve setup?
Hmm, looks like it’s working for you then, your steps are as close to ours as I am allowed to say. I am afraid I am a contractor working on a multinational’s code base, so until they’ve finished Legal with you I can tell you nothing more. But thanks for the feedback, I guess until later you should mark this invalid, cannot replicate. Niall
Hey Niall-
If you continue to have issues with enabling your plugin or are able to provide any additional information, feel free to comment back here to reopen the post and we will investigate further.
Cheers
Did you ever solve this? Just ran into the same problem all the way up in 4.26. In my case it only happens if the plugin is in the Engine plugins dir and marked as “Installed” and “EnabledByDefault”. Non-installed (i.e. built-in) plugins can be enabled by default, as can project plugins, but installed engine plugins seemingly don’t work.