在 Unity 中打造遊戲
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Google Play 商店很多遊戲都使用 Unity,這是一種跨平台遊戲引擎,可提供模組化工具,方便您製作並發布高度互動的 2D 或 3D 手遊。
建立適用於 Android 的 Unity 遊戲
如要為 Android 玩家打造遊戲體驗,請按照下列步驟操作:
- 下載並安裝 Unity Hub。
如要啟動 Unity Hub,請按一下「安裝」分頁,然後按一下「安裝 Unity 編輯器」。安裝支援 64 位元應用程式的 Unity 編輯器版本。這些版本支援 Android App Bundle,能夠讓您下載更小、更多最佳化的檔案。
安裝 Unity 編輯器時,請務必勾選選項旁邊的方塊,以加入「Android Build Support」模組。
- 展開「Android Build Support」模組。如果您使用的是 Unity 2019 以上版本,請新增「Android SDK & NDK Tools」模組。
在「專案」分頁中,按一下「新專案」。
如要開發遊戲,請參閱「學習」頁面。
Play Asset Delivery
Play Asset Delivery 可將 AssetBundle 和其他資產封裝到 Android App Bundle 中,並透過 Google Play 傳送。如要進一步瞭解如何將這項功能與 Unity 外掛程式整合,請參閱說明文件和 Runtime API 參考資料。
Play Integrity API
Play Integrity API 可協助您檢查遊戲是否未經修改、經由 Google Play 安裝,且在正版 Android 裝置或正規的 Google Play 遊戲電腦版上執行。偵測到有風險的流量時,遊戲的後端伺服器可以採取因應措施,防範未經授權的存取和作弊行為。如要進一步瞭解如何整合這項功能與 Unity 外掛程式,請參閱說明文件和 Runtime API 參考資料。
Play 應用程式內更新
Play 應用程式內更新功能可讓您在遊戲推出新版本時,提示使用者更新至最新版本,不必前往 Play 商店。如要進一步瞭解如何將這項功能與 Unity 外掛程式整合,請參閱說明文件和執行階段 API 參考資料。
Play 應用程式內評論
您可以透過 Play 應用程式內評論功能,提示使用者提交 Play 商店評分和評論,無需離開遊戲。如要進一步瞭解如何整合這項功能與 Unity 外掛程式,請參閱說明文件和 Runtime API 參考資料。
Play 遊戲服務
您可透過 Unity 的社群介面存取 Google Play 遊戲 API,並使用 Play 遊戲服務提供各項功能,例如透過 Google Play 遊戲帳戶驗證玩家身分、與好友名單互動,以及管理成就 (解鎖、顯示和增加)。如需詳細設定和使用說明,請參閱說明文件。
支援 16 KB 頁面大小
作業系統是以頁面為單位管理記憶體。為提升整體作業系統效能,並讓裝置製造商選擇是否要進行這項取捨,Android 15 (API 級別 35) 以上版本可使用 4 KB 或 16 KB 的分頁大小。設定為 16 KB 頁面大小的裝置平均會使用稍微多一點的記憶體,但效能也會有所提升。
Unity 2021、2022 和 Unity 6 支援 16 KB 頁面。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-08-26 (世界標準時間)。
[null,null,["上次更新時間:2025-08-26 (世界標準時間)。"],[],[],null,["Unity is a cross-platform game engine used by many games on the Google Play\nStore. Unity's modular tools help you produce and deliver highly engaging 2D or\n3D mobile games.\n\nCreate a Unity game for Android\n\nTo create a game experience for players on Android, follow these steps:\n\n1. [Download](https://unity3d.com/get-unity/download) and [install the Unity Hub](https://docs.unity3d.com/Manual/GettingStartedInstallingUnity.html).\n2. To start Unity Hub, click **Installs** tab and then click **Install Unity\n editor** . Install a version of the Unity Editor that [supports 64-bit\n apps](/games/optimize/64-bit#unity-developers). These versions support [Android App Bundles](/guide/app-bundle), which enable\n smaller, more optimized downloads.\n\n3. When you install the Unity Editor, make sure to include the [**Android Build\n Support**](https://docs.unity3d.com/Manual/android-sdksetup.html) module by checking the box next to it.\n\n - Expand the **Android Build Support** module. If you are using Unity 2019 or later, add the **Android SDK \\& NDK Tools** module.\n\n4. In the **Projects** tab, click **New project**.\n\n5. To develop your game, see the [learn](https://learn.unity.com/learn/) page.\n\nPlay Asset Delivery\n\nPlay Asset Delivery enables AssetBundles and other assets to be packaged into an\nAndroid App Bundle and delivered through Google Play. Refer to the\n[documentation](/guide/playcore/asset-delivery/integrate-unity) and [Runtime API reference](/reference/unity/namespace/Google/Play/AssetDelivery) for more information on how to\nintegrate this feature with Unity plugins.\n\nPlay Integrity API\n\nPlay Integrity API helps you check that your game is unmodified, installed by\nGoogle Play, and running on either a genuine Android-powered device or a genuine\ninstance of Google Play Games for PC. Your game's backend server can respond\nwhen you detect risky traffic to prevent unauthorized access and cheating. Refer\nto the [documentation](/google/play/integrity/setup#unity) and [Runtime API reference](/reference/unity/namespace/Google/Play/Integrity) for more information\non how to integrate this feature with Unity plugins.\n\nPlay In-app Updates\n\nPlay In-app Updates lets you prompt users to update to the latest version of\nyour game, when a new version is available, without the user needing to visit\nthe Play Store. Refer to the [documentation](/guide/playcore/in-app-updates/unity) and [Runtime API reference](/reference/unity/namespace/Google/Play/AppUpdate)\nfor more information on how to integrate this feature with Unity plugins.\n\nPlay In-app Reviews\n\nPlay In-app Reviews lets you prompt users to submit Play Store ratings and\nreviews without leaving your game. Refer to the [documentation](/guide/playcore/in-app-review/unity) and [Runtime\nAPI reference](/reference/unity/namespace/Google/Play/Review) for more information on how to integrate this feature with\nUnity plugins.\n\nPlay Games Services\n\nPlay Games Services lets you access the Google Play Games API through Unity's\n[social interface](http://docs.unity3d.com/Documentation/ScriptReference/Social.html) to provide access to features like player authentication\nwith Google Play Games accounts, interaction with friends lists, and achievement\nmanagement (unlocking, revealing, and incrementing). Detailed setup and usage\ninstructions are available in the [documentation](/games/pgs/unity/unity-start).\n\n16 KB page size support\n\nA page is the granularity at which an operating system manages [memory](https://android-developers.googleblog.com/2024/08/adding-16-kb-page-size-to-android.html).\nTo improve the operating system performance overall and to give device\nmanufacturers an option to make this trade-off, Android 15 (API level 35) and\nhigher can run with 4 KB or 16 KB page sizes. Devices configured with\n16 KB page sizes use slightly more memory on average but also gain various\nperformance improvements.\n\nUnity has 16 KB page support for [Unity 2021, 2022](https://discussions.unity.com/t/info-unity-engine-support-for-16-kb-memory-page-sizes-android-15/1589588) and [Unity 6](https://docs.unity3d.com/6000.0/Documentation/Manual/android-requirements-and-compatibility.html)."]]