Version: 1.3
语言 : 中文
Developing for OpenHarmony
Input for OpenHarmony devices

OpenHarmony mobile scripting

Note: For cross-platform Projects, use the UNITY_OPENHARMONY #define directive to conditionally compile OpenHarmony-specific C# code. See documentation on Platform dependent compilation to learn more.

Accessing device-specific features and properties

Apps can access most features of an OpenHarmony device through the Input and Handheld classes. For more information, see:

To access device-specific properties, use these scripts:

Script Device property
SystemInfo.deviceUniqueIdentifier Always returns the AAID.
SystemInfo.deviceModel Returns the device model. This often includes the manufacturer name and model number.
SystemInfo.operatingSystem Returns the operating system name and version.
Developing for OpenHarmony
Input for OpenHarmony devices