# How to rebuild an Engine Plugin?

**URL:** <https://forums.unrealengine.com/t/how-to-rebuild-an-engine-plugin/363175>\
**Category:** Plugins\
**Tags:** build, unreal-engine, module, Visual-Studio, Plugins, question, CPP\
**Created:** [July 6, 2016, 10:51pm UTC](https://forums.unrealengine.com/t/how-to-rebuild-an-engine-plugin/363175 "2016-07-06T22:51:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Roel](https://forums.unrealengine.com/u/Roel)\
**Post date:** [July 6, 2016, 10:51pm UTC](https://forums.unrealengine.com/t/how-to-rebuild-an-engine-plugin/363175/1 "2016-07-06T22:51:48Z")

</div>

When I create plugins inside my game folder I’m able to adjust the plugin files and recompile them from within my game project .sln.

But whenever I put plugins inside the engine folder they won’t recompile from within visual studio. I regenerated the project and they are visible inside the UE4/plugins folder in the solution explorer.

Am I missing something in my .cs files or anything else?

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [July 7, 2016, 12:01am UTC](https://forums.unrealengine.com/t/how-to-rebuild-an-engine-plugin/363175/2 "2016-07-07T00:01:24Z")

</div>

You need to build the engine from source to do so plugin in there build with it, you can try to use command line there is -plugin option in UBT (you can use it with build.bat) but not sure exacly how it works

You also don’t need to rebuild, you can copy paste module dll in plugin and it should work

---

<div class="post-metadata">

**Author:** ![Roel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Roel](https://forums.unrealengine.com/u/Roel)\
**Post date:** [July 7, 2016, 5:44am UTC](https://forums.unrealengine.com/t/how-to-rebuild-an-engine-plugin/363175/3 "2016-07-07T05:44:30Z")

</div>

Thanks Shadow river, I will look into the -Plugin option, if it doesn’the work I will go for the engine source.

I did copy it and it worked but since I use it for several projects and update it often it feels silly to move it around all the time.

---

<div class="post-metadata">

**Author:** ![M-Pixel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@M-Pixel](https://forums.unrealengine.com/u/M-Pixel)\
**Post date:** [September 19, 2017, 2:05am UTC](https://forums.unrealengine.com/t/how-to-rebuild-an-engine-plugin/363175/4 "2017-09-19T02:05:36Z")

</div>

I tried this and it didn’t work.  
I double-checked the UBT source code in order to figure out where the -plugin option is supposed to go, and whether or not it needs to be followed by the name of the plugin, but I found that no “-plugin” argument is ever parsed by UBT. The string simply does not exist in UnrealBuildTool.cs.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_88d57b37](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_88d57b37](https://forums.unrealengine.com/u/anonymous_user_88d57b37)\
**Post date:** [October 11, 2017, 10:18pm UTC](https://forums.unrealengine.com/t/how-to-rebuild-an-engine-plugin/363175/5 "2017-10-11T22:18:35Z")

</div>

according to this tutorial ([UE4 - recompiling plugins (Windows & Linux) - YouTube](https://www.youtube.com/watch?v=WtfLfYY_k2Y)) the command should be something like this, compiling the final plugin into the [TempFolder]:

```
"C:\Program Files\Epic Games\UE_4.17\Engine\Build\BatchFiles\RunUAT.bat" BuildPlugin -plugin="C:\Program Files\Epic Games\UE_4.17\Engine\Plugins\[...]\YourPlugin.uplugin" -package="[TempFolder]"

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e773414c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e773414c](https://forums.unrealengine.com/u/anonymous_user_e773414c)\
**Post date:** [November 12, 2018, 2:21pm UTC](https://forums.unrealengine.com/t/how-to-rebuild-an-engine-plugin/363175/6 "2018-11-12T14:21:22Z")

</div>

■■■■! this cmd will delete everything in TempFolder, what’s more it fails.

---

<div class="post-metadata">

**Author:** ![Scylardor4242](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Scylardor4242](https://forums.unrealengine.com/u/Scylardor4242)\
**Post date:** [March 13, 2019, 8:16pm UTC](https://forums.unrealengine.com/t/how-to-rebuild-an-engine-plugin/363175/7 "2019-03-13T20:16:24Z")

</div>

I managed to successfully build dll’s of a plugin with this command. Thanks!

Note that [TempFolder] will by default be put under C:\Program Files\Epic Games\UE\_4.17 (in this example).

I also had to make sure the .NET desktop development was installed with my Visual Studio using the Visual Studio Installer.

Actually the process failed at the end, but it seems it built the Win64 dlls before exiting, so I was able to copy them and replace the old ones, which was just what I needed.

---

<div class="post-metadata">

**Author:** ![Ruzihm](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ruzihm](https://forums.unrealengine.com/u/Ruzihm)\
**Post date:** [September 21, 2020, 6:39pm UTC](https://forums.unrealengine.com/t/how-to-rebuild-an-engine-plugin/363175/8 "2020-09-21T18:39:11Z")

</div>

I’m developing on Win64 platform and adding `-TargetPlatforms=Win64` resulted in a success for me.
