This post isn’t directly related to do with the Ultima Underworld Demo Remake (News about that soon) but it might be useful for many people out there who, like me have come across this problem and not been able to find a solution. I finally found out the process and would like to share it in a format that should help others.
Who is this tutorial for?
- Anyone who only uses the binary release of Unreal Engine.
- Uses Blueprint only projects.
- Has never or rarely used Visual studio.
- Wants to compile code plugins from GitHub/forums to be used with the binary release of Unreal Engine and be able to keep them up to date when new version are released.
I probably also need to say that this may not be the best way to do this but it is the way I found works for me. Let me know if there is a better way.
- make sure you have a binary version of Unreal Engine installed. This means a version that is installed by the Epic Games Launcher. I’m going to be using the latest release of Unreal Engine at the time of writing which is 4.16.2.
- You will also need an Unreal Engine account and a GitHub account that are linked together. Go here for instructions on how to set this up.
- You will need to install The GitHub desktop application from here. Check you GitHub account works OK with the App.
- Install Microsoft Visual Studio Community 2017 from here. After it has installed configure it to work with Unreal Engine using the instructions here.
- A plugin that you would like to use. For this tutorial I’m going to use the run time mesh loader plugin by the forum user GameInstitutes here but you can use any similar plugin. If you are following along just go to his GitHub page and download the Zip file using the green button labelled “clone or download”.
- Install a text editor. I prefer Notepad++ from here.
- Go to the following location in you binary install of Unreal Engine. The default location is C:\Program Files\Epic Games\UE_4.16\Engine\Source\Runtime\Launch\Resources
- Right click on the version.h file and open it with Notepad++.
- Scroll down to line 71 which should read #define BUILT_FROM_CHANGELIST followed by a number. For 4.16.2 the number is 3514769.
- Make a copy of this number. It will be different if you are using a different version of the Engine.
- Go to the Unreal Engine GitHub page here.
- Make sure the “Branch” drop down button is set to “release” or the same version of the binary Engine that you are using.
- Click the green “Clone or download” button
- Click “Open in desktop”
- This will launch the GitHub desktop application and fill in the URL and default local path location. If you need to change the local path location please do so here. Make a note of this location as we will be going there soon. For this tutorial I am changing mine to D:\GitHub.
- If everything is OK click the “Clone” button. This will take a while to download.
- Go to the folder location where the files were just downloaded.
- Run Setup.bat as administrator by right clicking and “Run as administrator”‘. This will download the rest of the software. This will take a long time depending on your internet connection speed.
- When this has finished right click GenerateProjectFiles.bat and run as administrator. When this has finished you should see a file called UE4.sln. This is the Visual Studio project file.
- Now go to the folder D:\GitHub\UnrealEngine\Engine\Source\Runtime\Launch\Resources and open the file version.h in Notepad++.
- Scroll down to line 71 #define BUILT_FROM_CHANGELIST 0
- Replace the 0 with the number we saved in step 4.
- Save the file.
- Now go back up to the folder D:\GitHub\UnrealEngine containing the UE4.sln file.
- Double click the UE4.sln file. If you have installed Visual Studio correctly then this will load Visual Studio and then load the Unreal Engine source code. This will take a while to load depending on your system. Make sure there is no activity in the blue bar at the bottom of the screen.
- When it has loaded fully you will see a file list on the left hand side of the screen. highlight UE4 under the engine folder by clicking on it and then right click and click build. This compile process can take several hours to complete depending on your system specification. When it has finished you should see 0 failed.
- Close Visual Studio
- Go to the folder D:\GitHub\UnrealEngine\Engine\Binaries\Win64
- Run the file UE4Editor.exe. It would also be a good idea to create a shortcut to this file on the desktop for future use.
- This will launch the newly compiled Epic Games Launcher which will look familiar to binary Engine users.
- Click the “New Project” tab
- Click the “C++” tab
- Make sure the Basic Code template is selected with no starter content.
- Change the name to something suitable. I use PluginDev so I can re use the project to compile plugins in the future.
- Click “Create project“
- When the project has been created and opened, close the project.
Compile the plugin
- Got to the location of the project created in step 30. the default location is C:\Users\<your username>\Documents\Unreal Projects\PluginDev
- Create a new folder here called Plugins.
- Open the zip file of the plugin you downloaded from GitHub. copy the contents to the plugins folder you just created. In our case the folder structure should be C:\Users\<your username>\Documents\Unreal Projects\PluginDev\Plugins\RuntimeMeshLoader.
- Go to the folder C:\Users\<your username>\Documents\Unreal Projects\PluginDev
- Double click the PluginDev.sln file. This will load the project into Visual Studio.
- When the project has fully loaded, right click PluginDev and click build. This will take a while to finish.
- Close Visual Studio.
Use the Plugin
- Go to the folder C:\Users\<your username>\Documents\Unreal Projects\PluginDev\Plugins
- Right click the RuntimeMeshLoader folder or the plugin folder you are trying to compile and click copy.
- Go to the folder of the Binary project you want to use the plugin in. for example C:\Users\<your username>\Documents\Unreal Projects\<your project>.
- Create a plugins folder if there is not one already there.
- Go into the Plugins folder, right click and paste the new compiled plugin.
- Open your normal binary Unreal Engine Launcher and load your project. If everything worked there should be no errors during loading the project.
- Click edit, Plugins.
- In this case scroll tot he bottom of the list to find the “Other” category. You will see the RuntimeMeshLoader plugin. Make sure it is ticked. If you are trying to use a different plugin then search the list for it as it may be under a different category.
This is quite long process for someone who has not done this before. It has worked so far with the few plugins have needed but I can’t be sure if this will work for all. Hope this helps someone and let me know if you know a better way or I did something wrong.