LiteRT-LM model inference support for Unity Android and Meta Quest apps. Supports v0.8.0+ of the LiteRT-LM Kotlin package for Android.
This package was designed for Unity 6.0 and above. Built and tested in Unity 6.3.
This package uses System.Threading.Channels. You can install it through NuGetForUnity
if you do not have the System.Threading.Channels library in your project. See How do I use NuGetForUnity? on how to use NuGetForUnity.
Since this package contains a native AAR plugin, it depends on the External Dependency Manager for Unity (EDM4U) to resolve native dependencies. You may already have EDM4U if you use Google or Firebase SDKs in your Unity project. If you do not, the installation steps are available here: EDM4U - Getting Started
- Open project settings
- Select
Package Manager - Add the OpenUPM package registry:
- Name:
OpenUPM - URL:
https://package.openupm.com - Scope(s)
com.uralstech
- Name:
- Open the Unity Package Manager window (
Window->Package Manager) - Change the registry from
UnitytoMy Registries - Add the
UAI.LiteRTLMpackage- Install
1.0.0-preview.2-litertlm0.9.0alpha01(default) for litertlm-android v0.9.0-alpha01 - Install
1.0.0-preview.2for litertlm-android v0.8.0
- Install
This will install the latest release of UAI.LiteRTLM. See releases on which version of litertlm-android the latest release supports. If you want to use a different version of litertlm-android, please choose a different installation method.
- Open the Unity Package Manager window (
Window->Package Manager) - Select the
+icon andAdd package from git URL... - Paste the UPM branch URL and press enter:
https://github.com/Uralstech/UAI.LiteRTLM.git#upm
- Clone or download the repository from the desired branch (master, preview/unstable) or tag (
1.0.0-preview.2for litertlm-android v0.8.0,1.0.0-preview.2-litertlm0.9.0alpha01for litertlm-android v0.9.0-alpha01) - Drag the package folder
UAI.LiteRTLM/UAI.LiteRTLM/Packages/com.uralstech.uai.litertlminto your Unity project'sPackagesfolder
Do not use preview versions (i.e. versions that end with "-preview") for production use as they are unstable and untested.
See https://uralstech.github.io/UAI.LiteRTLM/DocSource/QuickStart.html or APIReferenceManual.pdf and Documentation.pdf in the package documentation for the reference manual and tutorial.