Getting started (FULL version)

1. Creating the SAMPLE project

Why do we need to compile the plugin from source ?

In Unreal Engine there is no way to package a project that includes a plugin without it’s c++ source code.  Also it’s not possible to package a blueprint project with code plugins. Fortunately UNREAL4AR comes with full C++ source code, which makes possible to package any project on any platform.

To create the sample project follow the steps below:

a. Windows

  1. Install Visual Studio 2015 – community editions are also working
  2. Launch unreal engine editor
  3. Create a new C++ code project without starter content
  4. Copy all files from SampleProject directory to your new project directory
  5. In UE4 editor File -> Refresh visual studio project (optional)
  6. Exit from unreal engine editor
  7. Launch your new project from epic launcher
  8. Click on rebuild missing DLLs when prompted
  9. Optional: Click on File -> Package project -> Windows -> Windows 64bit

b. MAC OSX

  1. Install xcode from apple app store
  2. Launch unreal engine editor
  3. Create a new C++ code project without starter content
  4. Copy all files from SampleProject directory to your new project directory
  5. In UE4 editor File -> xcode project (optional)
  6. Exit from unreal engine editor
  7. Launch your new project from epic launcher
  8. Click on rebuild missing DLLs when prompted
  9. Optional: Click on File -> Package project -> OSX

c. Android

IMPORTANT: Plugin  version 1.6 and above requires Unreal Engine version v4.13 or higher!

Update: Plugin version 1.6, 1.7 and 1.8!

From plugin version v1.6 (Unreal Engine v4.13) it’s no longer required to use the source build of UE4. Android packaging works using the default launcher version of UE4.

  1. Setup your Android development enviroment. https://docs.unrealengine.com/latest/INT/Platforms/Android/GettingStarted/
  2. Launch unreal engine editor
  3. Create a new C++ code project without starter content
  4. Copy all files from SampleProject directory to your new project directory
  5. In UE4 editor File -> Refresh visual studio project (optional)
  6. Exit from unreal engine editor
  7. Launch your new project from epic launcher
  8. Click on rebuild missing DLLs when prompted
  9. Optional: Click to Launch on Android device button, or package the project.

IMPORTANT: Make sure to also generate an .OBB file. 

  1. Edit ->Project Settings -> Android -> UNCHECK Package game data inside APK
  2. Use the generated .bat file to install the packaged app to your device.

IMPORTANT: Before uploading to Google Play

In SampleProject\Plugins\ARToolkitPlugin\Source\ARToolkitPlugin\ARToolkitPlugin_APL.xml locate this line:

String obbPath = Environment.getExternalStorageDirectory() + "/obb/"; 

Change it to: 

String obbPath = Environment.getExternalStorageDirectory() + "/Android/obb/";

Previous versions only: Plugin version 1.5 or below!

Unfortunately the plugin won’t work with the original launcher version of UE4. It’s required to change some engine files to access the video camera stream on Android.

  1. Download Unreal Engine 4.10.2, or 4.11, or 4.12 source from github
    https://docs.unrealengine.com/latest/INT/GettingStarted/DownloadingUnrealEngine/index.html
  2. Copy the updated files from the plugin package (UpdatesForAndroid\UnrealEngine4\) to:
    UNREAL ENGINE:
    ----------------
    
    PATH_TO_UNREAL_ENGINE\Engine\Source\Runtime\Launch\Public\Android\AndroidJNI.h
    PATH_TO_UNREAL_ENGINE\Engine\Source\Runtime\Launch\Private\Android\AndroidJNI.cpp
    PATH_TO_UNREAL_ENGINE\Engine\Build\Android\Java\src\com\epicgames\ue4\GameActivity.java 
    PATH_TO_UNREAL_ENGINE\Engine\Build\Android\Java\jni\Android.mk 
    PATH_TO_UNREAL_ENGINE\Engine\Build\Android\Java\jni\armeabi-v7a\libc++_share.so
    
    YOUR PROJECT: 
    ---------------- 
    
    PATH_TO_PROJECT\Build\Android\ManifestRequirementsAdditions.txt
    
    
  3. Follow the steps on the following link to build the engine from source
    https://docs.unrealengine.com/latest/INT/Programming/Development/BuildingUnrealEngine/index.html
  4. Setup your Android development enviroment. https://docs.unrealengine.com/latest/INT/Platforms/Android/GettingStarted/
  5. Launch unreal engine editor (the one you have just built)
  6. Create a new C++ code project without starter content
  7. Copy all files from SampleProject directory to your new project directory
  8. In UE4 editor File -> Refresh visual studio project (optional)
  9. Exit from unreal engine editor
  10. Launch your new project from epic launcher
  11. Click on rebuild missing DLLs when prompted
  12. Optional: Click to Launch on Android device button

IMPORTANT: Plugin  version v1.9 , Unreal Engine version 4.17

On some Android 4.4.2. (KitKat) devices the sample app may crash right after the launch screen.

To FIX that disable the following plugins:

  • OnlineSubsystemNull
  • OnlineSubsystemUtils
  • OnlineSubsystemGooglePlay

d. iOS

  1. You will need a Mac computer to package your code project for IOS devices!
  2. Setup your iOS development enviroment,
    https://docs.unrealengine.com/latest/INT/Platforms/iOS/QuickStart/index.html
  3. Launch unreal engine editor (4.11, 4.12, 4.13 or later)
  4. Create a new C++ code project without starter content
  5. Copy all files from SampleProject directory to your new project directory
  6. In UE4 editor File -> Refresh xcode project (optional)
  7. Exit from unreal engine editor
  8. Launch your new project from epic launcher
  9. Click on rebuild missing DLLs when prompted
  10. Go to edit -> project settings -> iOS and import your mobile provision and certificate files
  11. Optional: Press the “Launch on iOS device” button