How do I suppress the "different engine version" error for my plugin? How do I deal with engine versions?

I’m making a C++ plugin and I’m building it against version 4.27.2. By that, I mean that I have engine 4.27.2 installed and I have a project, ProductionGameProj, that builds against it, and my plugin is in ProductionGameProj/Plugins.

I’m interested in giving this plugin to someone else, but when I do (by copying it to their Plugins/ dir in their game project), and their game project is also referencing engine 4.27.2, and then they start the project, they get a dialog that pops up and says…

The following modules are missing or build with a different engine version:

… and if they click “no”, then unreal doesn’t start.

The engine we’re both using is definitely 4.27.2. I can create a new game project and I have the same problem when transplanting the plugin from ProductionGameProj to the new game project. All of our projects have a .uproject file with

"EngineAssociation": "4.27",

My plugin has a .uplugin file with

"EngineVersion": "4.27.0"

I’ve played around with the “EngineVersion” entry in my .uplugin file, and depending on what I put for “EngineVersion”, I’ll either get the “different engine version” pop-up, or I’ll get a popup that says,

The <myplugin> plugin was designed for build X.XX.X. Attempt to load it anyway?

…but unreal still loads if you click “no”.

When I set “EngineVersion” to be:

NOTHING (I get rid of “EngineVersion” in .uplugin) => “The following modules are missing or build with a different engine version”

“4” => “The following modules are missing or build with a different engine version”

“4.26” => “The following modules are missing or build with a different engine version”

“4.27” => “The following modules are missing or build with a different engine version”

“4.26.0” => “The plugin was designed for build 4.26.0. Attempt to load it anyway?”

“4.26.X” (where X is any number) => “The plugin was designed for build 4.26.X. Attempt to load it anyway?”

“4.27.0” => “The following modules are missing or build with a different engine version”

“4.27.1” => “The plugin was designed for build 4.27.1. Attempt to load it anyway?”

“4.27.2” => “The plugin was designed for build 4.27.2. Attempt to load it anyway?”

“4.27.3” => “The plugin was designed for build 4.27.3. Attempt to load it anyway?”

What’s the deal here? Why is my plugin so poisonous? Why is unreal 4.27.2 so unhappy with loading a plugin built against 4.27.2 headers?

So I’m going to answer my own question here.

First, unbeknownst to me, you cannot “install” a binary-only plugin to a game/Plugins/ directory. If it’s there, it needs source, it needs a .Build.cs file for all the modules, and the unreal build tool and header tool expect to be able to see it and generate references to it in the project files. If this isn’t the case, then if the plugin is enabled, the build tool will complain that it found a plugin->module referenced in the .uproject file, but it can’t find the module to build.

So, binary plugins (ones with only the Binaries/ dir) must go in Engine/Plugins/.

Second, when you put a plugin in Engine/Plugins/, Unreal becomes more permissive about not having an "EngineVersion" key in the .uplugin json. So if you just get rid of "EngineVersion" you don’t get the “The following modules are missing or build with a different engine version” modal dialog box.

Looking at the code for FEngineVersion::Parse() it’s pretty clear to me why “4” and “4.26” and “4.27” caused the “The following modules are missing or build with a different engine version” dialog - the parser requires “X.Y.Z”

2 Likes

ok, but how to do this?

For anyone else having this issue this is what I did:

I was also trying to share a plugin to a teammate and we’re using the launcher copy of the editor and didn’t want to build from source. I tried removing “EngineVersion” in .uplugin, also the engine version matched, also checked “buildId” in .umodule and it matched the id of another plugin that’s working, also tried copying manifest files from .egstore just in case that mattered but nothing worked except this.

Solution:

  • Pass the plugin files directly through zip not through git vcs

Possible Cause:

  • VCS might be corrupting the .dll binaries
    • It was observed that the copy of the plugin that was working on my machine suddenly also gave the error when I discarded changes through git.