Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit 9f14feb

Browse files
author
Yuncong Zhang
committed
Merge branch 'master' into yczhang
2 parents e0f3721 + 9c8658e commit 9f14feb

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README-ZH.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,10 @@ $JSEvents
204204
在被标识的代码中,所有乘/除以`devicePixelRatio`都来自于我们的修改。
205205
若您需要详细了解此插件所修改的脚本,请参考您的Unity Editor安装目录下的`PlaybackEngines/WebGLSupport/BuildTools/lib`文件夹中的`SystemInfo.js``UnityNativeJS/UnityNative.js`
206206

207+
#### 九、图片导入设置
208+
默认情况下,Unity会将导入图片的宽和高放缩为最近的等于2的幂的整数。
209+
在UIWidgets中使用图片时,记得将这一特性关闭,以免图片被意外放缩,方法如下:在Project面板中选中图片,在"Inspector"面板中将"Non Power of 2"(在"Advanced"中)设置为"None"。
210+
207211
## 调试UIWidgets应用程序
208212

209213
#### 定义UIWidgets_DEBUG

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ If you still need the function provided by this plugin, you can mannually apply
236236
All the modifications introduced in `UIWidgetsCanvasDevicePixelRatio` are marked by `////////// Modifcation Start ////////////` and `////////// Modifcation End ////////////`.
237237
In the marked codes, all the multiplications and divisions with `devicePixelRatio` are introduced by our modification.
238238
To learn about the original script in detail, please refer to `SystemInfo.js` and `UnityNativeJS/UnityNative.js` in `PlaybackEngines/WebGLSupport/BuildTools/lib` in your Unity Editor installation.
239+
240+
#### Image Import Setting
241+
Unity, by default, resizes the width and height of an imported image to the nearest integer that is a power of 2.
242+
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.
239243

240244
## Debug UIWidgets Application
241245

0 commit comments

Comments
 (0)