In some scenarios, developers using native platform technologies such as Java/Android, Objective C/iOS, or Windows Win32/UWP, want to include Unity-powered features in their games or applications. These features might use 3D or 2D real-time rendering, like AR experiences, interaction with 3D models, 2D mini-games, and so on.
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. 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 dependencies, 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 (~100Mb or less) to be able to instantly switch back and run again in the same process.
Application.Quit), it’s not possible to reload Unity again in the same app session.