Skip to content

v2.6.1

Choose a tag to compare

@Aaron8052 Aaron8052 released this 24 Apr 03:11

⚠️ Obsolete API

Device

string GetCountryCode()

使用 string GetLocaleISOCode() 代替。


新增 API

NativeUI

void OpenURL(string url)

与 Unity Application.OpenURL 作用一致。

Device

bool IsIPhoneNotchScreen()

判断是否为刘海屏/灵动岛机型的 iPhone。

Version GetIOSVersion()

获取当前 iOS 版本,获取失败则返回 new Version(0, 0)。

string GetLocaleISOCode()

获取当前设备的ISO地区码(ISO 3166-1 alpha-2)。

string GetLanguageISOCode()

获取当前设备语言的ISO码(例:zh-Hans-CN)。

Audio

event Action OnAudioSessionRouteChangedEvent

玩家音频设备变更事件,例如:扬声器 -> 蓝牙耳机。

iOSApplication

string GetAlternateIconName()

获取当前使用的 AppIcon,如使用默认图标则返回 null

void SetAlternateIconName(string iconName)

设置 AppIcon,iconName 传入 null 使用默认图标。