To try the included ar sample project follow the steps below:
a. Windows
- Install Visual Studio 2019 community edition
- Copy the SampleProject directory to your project directory
- Launch your project by double clicking on the .uproject file
- Click on rebuild missing modules when prompted
- Press the play button in the editor to start the project
- Choose your webcam from the list, select resolution, and press the start button
- Use the printed Hiro, or Pinball markers to track the motorcycle
b. Android
- Setup your Android development enviroment. https://docs.unrealengine.com/latest/INT/Platforms/Android/GettingStarted/
- Copy the SampleProject directory to your project directory
- Launch your project by double clicking on the .uproject file
- Click on rebuild missing moduless when prompted
- File -> Package project -> Android
IMPORTANT: Make sure to also generate an .OBB file.
- Edit ->Project Settings -> Android -> UNCHECK Package game data inside APK
- Use the generated .bat file to install the packaged app to your device.
IMPORTANT: 32bit vs 64bit version
Only 64bit builds are supported
Edit ->Project Settings -> Android -> Build -> Uncheck Support armv7
Edit ->Project Settings -> Android -> Build -> Check Support arm64-v8a
IMPORTANT:Camera autofocus:
There is CameraPlayer14.java file at this folder
C:\Program Files\Epic Games\UE_X.XX\Engine\Plugins\Media\AndroidCamera\Source\AndroidCamera\Java\src\com\epicgames\ue4.
You should add line:
param.setFocusMode("continuous-picture");
after line 520.
c. iOS
- You will need a Mac computer to package your code project for IOS devices!
- Install the latest xcode from apple app store
- Setup your iOS development environment,
https://docs.unrealengine.com/latest/INT/Platforms/iOS/QuickStart/index.html - Go to edit -> project settings -> iOS and import your mobile provision and certificate files
- Copy the SampleProject directory to your project directory
- Launch your project by double clicking on the .uproject file
- Click on rebuild missing modules when prompted
- For IOS is necessary to add the following line to the
Project Settings > IOS > Extra PList Data>Additional PList Data
:<key>NSCameraUsageDescription</key><string>Camera is used for AR functionality</string>
- File -> Package project -> iOS
d, macOS
The project uses the free WebCamera feed plugin (https://github.com/bakjos/WebCameraFeed) to grab camera frames on iOS, and macOS
The latest versions of OSX require the request to access to the camera, so this plugin won’t work while in the editor. To be able to use the camera in the binary, you need to edit the .plist file in the packaged mac os build, and add some additional plist data. <key>NSCameraUsageDescription</key><string>Camera is used for AR functionality</string>