Version: 2022.3
言語: 日本語
プラットフォーム特有の情報
ディープリンク

Unity as a Library を他のアプリケーションで使用

Unity as a Library は、Java/Android、Objective C/iOS、Windows Win32/UWP などのネイティブプラットフォームテクノロジーを使用し、ゲームやアプリケーションに Unity を活用した機能を使用したい専門的なユーザーを対象としています。

このドキュメントは、Java/Android、Objective C/iOS、Windows Win32/UWP などのネイティブプラットフォームテクノロジーの開発経験があり、プロジェクトの構造体 、言語機能、特定のプラットフォーム設定オプション (例えば、ユーザー権限) の知識があることを前提としています。

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 AR 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.

現在、以下のプラットフォームが Unity as a Library をサポートしています。

プラットフォームのバージョンとその他の依存関係を確認するには、システム要件 のページを参照してください。

制限

別のアプリケーションによってホストされている場合 、Unityはランタイムの ライフサイクルを制御しないため、すべてのシナリオで機能するわけではありません。既知の制限は以下のとおりです。

  • Android と iOS
    • フル画面レンダリングのみがサポートされています。画面の一部のみにレンダリングすることはできません。
    • When Unity is in an unloaded state (after calling 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’s not released largely depends on the device’s graphics resolution.
  • iOS で Unity ランタイムが完全に終了した場合 (Application.Quit の呼び出し後)、同じアプリケーションセッションで再度 Unity を再起動ことはできません。
  • Unity ランタイムの複数のインスタンスを読み込んだり、複数の Unity ランタイムを統合したりすることはできません。
  • 正しく動作させるために ネイティブ プラグインと マネージ プラグインの調整が必要な場合があります。

  • Unity as a Library は 2019.3 に追加NewIn20193
プラットフォーム特有の情報
ディープリンク