File tree 2 files changed +7
-6
lines changed
Demo/API_V2/Assets/Scripts
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -71,13 +71,12 @@ private void Awake()
71
71
) ;
72
72
73
73
// 获取微信小游戏的系统信息
74
- #if UNITY_WEBGL && ! UNITY_EDITOR
75
74
WindowInfo = WX . GetWindowInfo ( ) ;
76
75
MenuButtonBoundingClientRect = WX . GetMenuButtonBoundingClientRect ( ) ;
77
- #else
78
- WindowInfo = new WindowInfo { safeArea = new SafeArea ( ) } ;
79
- MenuButtonBoundingClientRect = new ClientRect ( ) ;
80
- #endif
76
+
77
+ // 非小游戏与预览环境下防止报错
78
+ WindowInfo ?? = new WindowInfo { safeArea = new SafeArea ( ) } ;
79
+ MenuButtonBoundingClientRect ??= new ClientRect ( ) ;
81
80
}
82
81
) ;
83
82
}
Original file line number Diff line number Diff line change 1
1
# 微信系统字体
2
2
游戏基本会使用中文,中文字体大小少则2-3M。
3
3
4
- 通过微信系统字体,从本地加载中文,可节省启动下载的资源量。再不支持使用微信系统字体时,回退成通过CDN下载后备字体的形式。
4
+ 通过微信系统字体,从本地加载中文,可节省启动下载的资源量。在不支持使用微信系统字体时,回退成通过CDN下载后备字体的形式。
5
+
6
+ ** IOS18暂不支持使用微信系统字体,必须提供后备字体才能正常使用。**
5
7
6
8
## 版本要求
7
9
` 转换插件 >= 202306292010 ` 提供了 ` WX.GetWXFont ` 接口用于加载后备/系统字体
You can’t perform that action at this time.
0 commit comments