Installing Mono for Unreal Engine

Building Unreal Engine with the Mono plugins.

To install Mono for Unreal Engine, you'll need to build the Unreal Editor from source and then add the Mono extension that enables the use of C# with Unreal Engine.

The current add-in has been tested with version 4.4. This page describes how to setup Unreal Engine to allow C# development with Mono, and how to setup your MonoDevelop or XamarinStudio IDEs to write your C# code.

Building Unreal Engine from Source

  1. First, clone the Unreal Engine repo using Git. It can be found here.
  2. Check out the 4.4 branch. You can do this by running:
    git checkout 4.4
    You can also use one of the git desktop applications if you prefer.
  3. Download the required 4.4 dependencies. There are two zip files: here and here
  4. Unzip these dependencies into the directory you cloned the UrealEngine repo to. Be careful to make sure the folders are merged together, not overwritten (on Mac, this can be done by Option->dragging the folder into the UnrealEngine directory, and clicking "Keep Newer" when prompted).

Windows

  1. To build the source on Windows, you need Visual Studio 2013 installed. You can use the free version if you do not own it, Visual Studio Community 2013.
  2. Install the June 2010 DirectX runtime. This can be found here.
  3. In the UnrealEngine folder (the directory you cloned the repo into), run GenerateProjectFiles.bat. This should run quickly.
  4. Now you can open the Visual Studio Solution that you just generated (it should be called UE4.sln).
  5. Once Visual Studio has opened, set the solution configuration to Development Editor, and set the platform to Win64. Build the project by selecting Build from the dropdown menu. This could take a while (up to 40 minutes, depending on your system), so go ahead and take a break here. Grab a coffee or something.
  6. You can then run the editor from Visual Studio by setting the UE4 project as your startup project and pressing the green triangle in toolbar (or pressing F5).
  7. Finally, you can setup your Windows shell so that you can interact with .uproject files. Find the file called UnrealVersionSelector-Win64-Shippping.exe in the UnrealEngine/Engine/Binaries/Win64/_ folder and run it. Now, you'll be able to double-click .uproject files to load the project, or right click them to quickly update Visual Studio files.

Mac

  1. Install Xcode 6.1. You can find this in the app store, or here.
  2. From the UnrealEngine folder, run GenerateProjectFiles.command (if in the finder) or GenerateProjectFiles.sh (if in the terminal). It should execute fairly quickly.
  3. Open the UE4.xcodeproj file.
  4. You can use this project to compule the UE4 Editor. Select the correct target in the top left of the window (it should be UE4Editor - Mac, targeted for My Mac). Then, build the project by going to Product -> Build For -> Running in the menus. This can take a while (up to 40 minutes), so feel free to take a break and grab a coffee or something.
  5. After the project finishes compiling, you can run the editor by going to Product -> Run in the menu.

Adding Mono for Unreal Engine

After you've successfuly built Unreal Engine 4.4 from the source, you can add the Mono for Unreal Engine plugins. Here's how to do that:

  1. Download the Mono for Unreal Engine zip file from our Download page (if you haven't already). The file should be called XamarinUE4.zip.
  2. Extract the zip file into the UnrealEngine source directory, again making sure that the folders are merged, not overwritten, in the same way as before.
  3. You can then run the terminal commands in the UnrealEngine directory (if using a desktop app, you can launch a terminal/console window from the app with the UnrealEngine repo selected):
    git checkout 4.4
    git checkout -b 4.4-xamarin
    git am Engine/Plugins/XamarinUE4/Patches/*
    This should create a new git branch called "4.4-xamarin" with the Mono for Unreal Engine patches applied and committed.
  4. You can now rebuild the Unreal Editor the same way as you did before; the Mono for Unreal Engine plugins and binding assemblies will be included automatically.

Installing the Xamarin Studio Addin

  1. Install Xamarin Studio (it can be downloaded from the Xamarin website.
  2. Switch your Xamarin Studio update channel to Alpha, then download all updates. Mono for Unreal Engine requires Xamarin Studio 5.6+ (or MonoDevelop 5.6+), which are both currently in Alpha. After switching your update channel, allow Xamarin Studio to download and install all updates.
  3. Open Xamarin Studio, and open the Add-in Manager.
  4. Click the "Install from file" button, browse to the directory UnrealEngine/Engine/Plugins/XamarinUE4, select the file XamarinStudio.Unreal_1.0.mpack, and install it.

Start Creating!

Now that you have Mono for Unreal Engine and all the dependencies installed, you can see how to get started by creating a new project or adding C# to an existing project on our Getting Started page.