Skip to content

PureHarmonyProject/UnityProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UnityProject

The Unity Oniro SDK enables game developers to seamlessly port and publish Unity games to Oniro deployment.


Unity_Oniro_SDK_1.0.0.unitypackage

📁 Plugins

📁 Oniro

📁 Editor

🔧 HarmonyNativePlugin.cs

📁 Documentation

📘 Porting_Guide.pdf

📗 API_Reference.chm

🎬 Tutorial_Videos

📁 Examples

🎮 DemoGame

🔧 MinimalTemplate

📁 Tools

🛠️ AssetConverter.exe

🔧 ProjectGenerator

🚫 Current Compatibility Gap

Unity Version PureHarmony Status Key Issues

Unity 6 (6000.0.53f1) ❌ Not Supported • Different native plugin API

• Updated graphics pipeline

• New Vulkan/IL2CPP changes

Unity 2022 LTS ✅ Target Support • Stable native interfaces

• Proven plugin system

• Mature IL2CPP

Unity 2021 LTS ✅ Primary Target • Maximum compatibility

• Broad device support

• Well-documented APIs

🔧 Technical Barriers with Unity 6

  1. Native Plugin Interface Changes

csharp

// Unity 6 likely has updated native plugin interfaces
// Current PureHarmony uses Unity 2022 LTS patterns:
[DllImport("unity.bridge")]
public static extern void UnityHarmony_Initialize();
// Unity 6 may require:
[DllImport("unity.bridge", CallingConvention = CallingConvention.Cdecl)]
public static extern unsafe void UnityHarmony_InitializeV2(IntPtr config);
  1. Graphics Pipeline Updates Unity 6 introduces significant rendering changes:

New Vulkan requirements (1.3+ features)

Enhanced SRP (Scriptable Render Pipeline) changes

Different shader compilation targets

Updated EGL/Vulkan context management

  1. IL2CPP & Burst Compiler Evolution

cpp

// Unity 6's IL2CPP may generate different native interfaces
// Current bridge expects Unity 2022 LTS ABI compatibility
extern "C" {
    void UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API 
    UnityPluginLoad(IUnityInterfaces* unityInterfaces);
    
    // Unity 6 may change this interface
}

🗓️ Realistic Timeline Phase 1: Foundation (Now) ✅ Unity 2021/2022 LTS support

✅ Basic HarmonyOS graphics/input

✅ AppGallery deployment pipeline

Phase 2: Unity 6 Support (Q2 2026) 🔄 Unity 6 native plugin adaptation

🔄 Updated graphics bridge for new Vulkan features

🔄 IL2CPP compatibility testing

Phase 3: Advanced Features (2026+) ◻️ Unity 6 DOTS/ECS optimization

◻️ Enhanced XEngine integration

◻️ Cloud build services

🎯 Recommended Approach For Current Projects: bash

Downgrade to Unity 2022.3 LTS for HarmonyOS support

Unity Hub → Install Unity 2022.3.xxf1 → Import PureHarmony For New Projects: bash

Start with Unity 2022 LTS + PureHarmony

Plan Unity 6 upgrade after PureHarmony v2.0

Migration Strategy: Develop in Unity 2022 LTS with PureHarmony

Port to HarmonyOS and validate performance

Upgrade to Unity 6 once PureHarmony supports it

Optimize using Unity 6-specific features

🔍 Checking Your Project's Compatibility

csharp // Add this to your project to check compatibility

public class HarmonyOSCompatibilityCheck : MonoBehaviour
{
    void Start()
    {
        #if !UNITY_2022_3_OR_NEWER || UNITY_6000_OR_NEWER
        Debug.LogError("PureHarmony requires Unity 2022 LTS. " +
                      "Unity 6 support coming in 2026.");
        #else
        Debug.Log("Project compatible with PureHarmony!");
        #endif
    }
}

💡 Bottom Line Wait for PureHarmony v2.0 if you require Unity 6 features. For immediate HarmonyOS deployment, use Unity 2022 LTS.

The PureHarmony team is actively monitoring Unity 6 changes and will release compatibility updates as the ecosystem stabilizes. Check the PureHarmony Roadmap for the latest Unity 6 support timeline.

About

Unity for Oniro Development Kit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published