Unity as a Library is intended for specialist users who use native platform technologies such as Java/Android, Objective C/iOS, or Windows Win32/UWP, and want to include Unity-powered features in their games or applications.
This documentation assumes that you have experience with developing for native platform technologies such as Java/Android, Objective C/iOS, or Windows Win32/UWP, and that you are familiar with the structure of the project, language features and specific platform configuration options (for example, user permissions).
Starting with Unity 2019.3, you can use Unity as a Library in other applications by integrating your content and the Unity runtime components in a native platform project. This enables you to embed content that uses 3D or 2D real-time rendering, like ARAugmented Reality (AR) uses computer graphics or video composited on top of a live video feed to augment the view and create interaction with real and virtual objects.
See in Glossary experiences, interaction with 3D models, 2D mini-games, and so on. The Unity Runtime Library exposes ways to manage loading, activating, and unloading within the native application.
The following platforms currently support Unity as a Library:
To determine platform versions and other dependenciesIn the context of the Package Manager, a dependency is a specific package version (expressed in the form
package_name@package_version) that a project or another package requires in order to work. Projects and packages use the dependencies attribute in their manifests to define the set of packages they require. For projects, these are considered direct dependencies; for packages, these are indirect, or transitive, dependencies. More info
See in Glossary, see the system requirements page.
When hosted by another application, Unity doesn’t control the runtime lifecycle, so it might not work in all scenarios. Known limitations include:
Application.Unload), it retains some amount of memory (between 80–180Mb) to be able to instantly switch back and run again in the same process. The amount of memory that is not released largely depends on the device’s graphics resolution.
Application.Quit), it’s not possible to reload Unity again in the same app session.