Update README for Emoji.
This commit is contained in:
Родитель
7429e06cce
Коммит
fe192fe1ff
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче