Recompiling an Unreal Plugin

Hello,

I would like to edit the Smart Objects plugin from Unreal. But I don’t know how to recompile the plugin, in order for my changes to take effect.

Can someone help me out please?

Managed to find a work around.

Using the Unreal Build Tool (UAT) - Command Line

  1. In a command prompt, navigate to the Batchfiles folder within your Unreal Engine installation: cd [installed UE location]/Engine/Build/Batchfiles.

  2. Execute the following command (replace [uplugin file path] and [temporary directory] with your actual paths): .\RunUAT.bat BuildPlugin -plugin="[uplugin file path]" -package="[temporary directory]".

  3. For me this resulted in a Build Failed - due to some dependencies between modules, so what I ended up doing was opening the .uproject in [temporary directory] generated by the command from previous step. Then created a solution (.sln), by adding a c++ class to the project. Finally in Visual Studio I rebuilt the whole solution.

  4. Copy the rebuilt plugin from the [temporary directory] to the engine’s plugins directory, overwriting any existing files.

And this did it for me. Hope it helps someone with the same or similar issue.

Smart Objects plugin from Unreal

Since it’s an engine plugin, you have a two ways:

  1. Hardway: Recompile the whole engine from scratch, ex: making installed build
  2. Easy way: Literally copying it into your project: copy folder Engine\Plugins\Runtime\SmartObjects to PROJECT/plugins/Runtime/SmartObjects, and then regenerate solution file. This way the plugin’s copy will be a part of your project (that can be changed at any time without recompiling whole engine). And since the project’s plugins takes precedence over engine’s when two of the same name is occured - the one in the project will be actually used.
    Note: in case target plugin has some dependencies on other plugin - those have to be moved to project as well (engine’s plugins can’t depend on project ones)
1 Like

Thank you for the reply. Truly appreciated.

I guess I ended up doing something similar with your second point, although yours is way simpler.

But I guess the correct way would be your first solution. Aka, the Hardway. XD