This commit is contained in:
Yuncong Zhang 2019-06-14 14:34:45 +08:00
Родитель 7429e06cce
Коммит fe192fe1ff
2 изменённых файлов: 15 добавлений и 0 удалений

Просмотреть файл

@ -211,6 +211,12 @@ $JSEvents
默认情况下Unity会将导入图片的宽和高放缩为最近的等于2的幂的整数。
在UIWidgets中使用图片时记得将这一特性关闭以免图片被意外放缩方法如下在Project面板中选中图片在"Inspector"面板中将"Non Power of 2"(在"Advanced"中)设置为"None"。
#### 十、更新表情(Emoji)
UIWidgets支持渲染文本中包含的表情。表情的图片来自[https://www.joypixels.com](https://www.joypixels.com/)提供的免费资源。
如果您希望使用自己的表情图片,请更新纹理图`Tests/Resources/Emoji.png`,以及`Runtime/ui/txt/emoji.cs`中将Unicode映射到纹理图中具体位置的映射表。
特别地请记得更新Dictionary变量`emojiLookupTable`,纹理图的行数`rowCount`以及纹理图的列数`colCount`。
## 调试UIWidgets应用程序
#### 定义UIWidgets_DEBUG

Просмотреть файл

@ -248,6 +248,15 @@ To learn about the original script in detail, please refer to `SystemInfo.js` an
Unity, by default, resizes the width and height of an imported image to the nearest integer that is a power of 2.
In UIWidgets, you should almost always disable this by selecting the image in the "Project" panel, then in the "Inspector" panel set the "Non Power of 2" option (in "Advanced") to "None", to prevent your image from being resized unexpectedly.
#### Update Emoji
UIWidgets supports rendering emoji in (editable) texts. The emoji images comes from the free
resources provided by [https://www.joypixels.com](https://www.joypixels.com/). If you would
like to use your own images for emoji, please update the texture image `Tests/Resources/Emoji.png`,
and the unicode-index table in `Runtime/ui/txt/emoji.cs` which maps unicodes to specific locations
in the texture. Specifically, remember to update the Dictionary `emojiLookupTable`, number of rows
in the texture `rowCount`, and number of columns `colCount`.
## Debug UIWidgets Application
#### Define UIWidgets_DEBUG