/unity-as-a-library-ar-ios

Sample project demonstrating Unity 6’s AR Mobile Core template integrated as a library into a native iOS app (Xcode 16.4). Includes build scripts, native host app, and Unity project setup.

Primary LanguageC#

Unity as a Library (UaaL) — Unity 6 + Xcode 16.4 + AR Mobile Core

Embed Unity-powered AR directly into your native iOS apps with a clean, reproducible setup.

Unity Version Xcode Version Platform AR

This repository is a working sample showing how to embed a Unity 6 AR Mobile Core project inside a native iOS app using Unity as a Library (UaaL).
It covers the full process from Unity project setup to iOS build export to native integration in Xcode 16.4, including AR camera functionality and debugging.

Full step-by-step guide: Unity as a Library with Unity 6 & Xcode 16.4

Repository Structure

/Unity/ # Unity 6 AR Mobile Core project (source only) /UaaLHostFinal/ # Native iOS host app (SwiftUI)

Features

  • Unity 6 AR Mobile Core template integration into a native iOS app
  • SwiftUI-based host with Objective-C bridge for Unity
  • Camera permission and AR session support
  • Native debugging in Xcode
  • Unity C# debugging over USB with VS Code and iproxy

Requirements

  • Unity 6000.x (Unity 6)
  • Xcode 16.4
  • macOS with libimobiledevice (brew install libimobiledevice) for USB debugging
  • Physical iOS device (required for AR testing)

Quick Start

  1. Clone this repository
  2. Open /Unity/ in Unity 6 and build for iOS into ios-host/UnityBuild/
  3. Open /UaaLHostFinal/UaaLHostFinal.xcworkspace in Xcode
  4. Set your signing team, build, and run on device