Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocean committed Jan 7, 2025
2 parents 245385b + ff214e3 commit 147864a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 4 additions & 5 deletions Demo/API_V2/Assets/Scripts/GameManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,12 @@ private void Awake()
);

// 获取微信小游戏的系统信息
#if UNITY_WEBGL && !UNITY_EDITOR
WindowInfo = WX.GetWindowInfo();
MenuButtonBoundingClientRect = WX.GetMenuButtonBoundingClientRect();
#else
WindowInfo = new WindowInfo { safeArea = new SafeArea() };
MenuButtonBoundingClientRect = new ClientRect();
#endif

// 非小游戏与预览环境下防止报错
WindowInfo ??= new WindowInfo { safeArea = new SafeArea() };
MenuButtonBoundingClientRect ??= new ClientRect();
}
);
}
Expand Down
4 changes: 3 additions & 1 deletion Design/WXFont.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# 微信系统字体
游戏基本会使用中文,中文字体大小少则2-3M。

通过微信系统字体,从本地加载中文,可节省启动下载的资源量。再不支持使用微信系统字体时,回退成通过CDN下载后备字体的形式。
通过微信系统字体,从本地加载中文,可节省启动下载的资源量。在不支持使用微信系统字体时,回退成通过CDN下载后备字体的形式。

**IOS18暂不支持使用微信系统字体,必须提供后备字体才能正常使用。**

## 版本要求
`转换插件 >= 202306292010` 提供了 `WX.GetWXFont` 接口用于加载后备/系统字体
Expand Down

0 comments on commit 147864a

Please sign in to comment.