Read the original article:Unity engine adaptation development
Problem Description
How can you use the Unity engine to develop and build applications for the HarmonyOS/OpenHarmony platform?
Background Knowledge
- In mainland China, Tuanjie Engine is the localized distribution of Unity with native OpenHarmony target support. It adds build tooling and Player Settings specific to OpenHarmony, enabling you to produce HAPs and full DevEco projects.
- The OpenHarmony build pipeline in Tuanjie converts a Unity/Tuanjie project into an Hvigor-based HarmonyOS project and maps Player/Build Settings into module configs.
Solution
-
Set Up Tuanjie + DevEco
- Install Tuanjie Engine (Unity China) with the OpenHarmony platform modules.
- Install DevEco Studio + HarmonyOS SDK to run, debug, and package the generated projects.
-
Configure Player Settings (OpenHarmony)
- In Tuanjie, open Player Settings → OpenHarmony to set icon, resolution, splash, Other/Publishing Settings (package name, signing, etc.).
-
Build Pipeline
- Use File → Build Settings → OpenHarmony and build:
- HAP debug package for quick device tests; or
- Export Project to generate an Hvigor/DevEco project for further signing/packaging in DevEco Studio.
- Use File → Build Settings → OpenHarmony and build:
-
Run & Debug
- Install the HAP on a device/emulator or open the exported project in DevEco Studio for debugging and release signing.
-
Plugins & Services
- For Huawei Mobile Services or common Unity ecosystem tools, check Tuanjie compatibility or forks/workarounds (e.g., HMS Unity plugin threads; EDM4U resolver adjustments for Tuanjie project names).
-
Samples & References
- Review OpenHarmony/Tuanjie samples and community guides (including a community TuanjieEngine-OH repo showing HAP builds and DevEco export).
Top comments (0)