Version: Unity 6.5 (6000.5)
Language : English
Troubleshooting common cross-platform issues
Deep linking

Use Unity as a Library in other applications

Use Unity as a Library to insert Unity-powered features into applications built with native platform languages, such as Java, Swift, or C++.

You can integrate your content and the Unity runtime components in native platform projects. This allows you to embed content that uses 3D or 2D real-time rendering, like ARAugmented Reality More info
See in Glossary
experiences, interaction with 3D models, and 2D mini-games. The Unity Runtime Library exposes ways to manage loading, activating, and unloading within the native application.

Prerequisites

You must have experience developing for native platform technologies such as Java/Android, Objective C/iOS, or Windows Win32/UWP. You also need familiarity with the project structure, language features, and specific platform configuration options, such as user permissions.

Supported platforms

The following platforms currently support Unity as a Library:

To determine platform versions and other dependencies, refer to the system requirements page.

Limitations

When hosted by another application, Unity doesn’t control the runtime lifecycle, so it might not work in all scenarios. Known limitations include:

General limitations**

  • You can’t load or integrate more than one instance of the Unity runtime.
  • You might need to adapt your native and managed plug-insA set of code created outside of Unity that creates functionality in Unity. There are two kinds of plug-ins you can use in Unity: Managed plug-ins (managed .NET assemblies created with tools like Visual Studio) and Native plug-ins (platform-specific native code libraries). More info
    See in Glossary
    to work properly with this feature.

Android and iOS

  • Unity supports only full-screen rendering. If you’re a Unity Industry customer, these features and limitations differ.
  • When Unity is in an unloaded state (after you call Application.Unload), it retains memory (between 80 and 180 MB) to instantly switch back and run again in the same process. The amount of retained memory depends on the device’s graphics resolution.

iOS only

  • If the Unity runtime quits entirely (after you call Application.Quit), you can’t reload Unity again in the same app session.

Additional resources

Troubleshooting common cross-platform issues
Deep linking