Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unity SDK as Library

Overview

This repository explains how to package a Unity scene as a platform-specific library and embed it inside a native host app.
Currently, the implementation focuses on Android (Kotlin), with iOS support coming soon.


Android

Overview

On Android, Unity is exported as an Android library (AAR) and embedded into a Kotlin-based app.
Use this setup if you want a native Android shell that launches Unity for navigation or other 3D experiences while keeping control in Kotlin.

Contents

  • Android/Unity_AAR_Integration_Kotlin.md – exhaustive Unity export and Android integration guide.
  • AndroidSample/ – minimal Kotlin app showing how to launch Unity, pass MapCode data, and handle results.
  • unityLibrary-debug.aar (generated) – Unity output that gets dropped into the Android sample’s app/libs/ folder.

Requirements

  • Unity 6.0 (6000.0.62f1) LTS or newer with Android Build Support.
  • Android Studio Flamingo or newer with SDK + NDK installed.
  • Java 11+ and Gradle 8+ (the Android sample uses Kotlin DSL scripts).

Quick Start

  1. Export from Unity – Enable Export Project, export to UnityExport/, then build the AAR via Gradle (unityLibrary:assembleDebug).
  2. Update Android Sample – Copy the generated unityLibrary-debug.aar into AndroidSample/app/libs/.
  3. Sync & Run – Open AndroidSample/ in Android Studio, sync Gradle, and run on a device. Use the MapCode field to send data into Unity; observe return data in the result TextView.
  4. Manifest Cleanup – In UnityExport/unityLibrary/src/main/AndroidManifest.xml, comment or remove the launcher <intent-filter> from UnityPlayerGameActivity to avoid duplicate app icons.

Documentation

The full Android walkthrough with screenshots, Gradle snippets, manifest requirements, and Android↔Unity messaging examples lives in
Android/Unity_AAR_Integration_Kotlin.md. Check that file first when in doubt.


iOS (Coming Soon)

Overview

iOS support will allow embedding the same Unity experience inside a native iOS app, following a similar pattern to Android:

  • Unity exported as an iOS framework/library.
  • Native iOS host responsible for app shell, navigation, and lifecycle.
  • Structured data exchange between iOS and Unity.

Status

  • Planned: Design and implementation in progress.
  • Not yet available: No iOS sample project is included in this repository.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages