This commit is contained in:
Yuncong Zhang 2019-04-29 13:55:46 +08:00
Родитель 6a0232d9dc
Коммит ea198cecfc
2 изменённых файлов: 8 добавлений и 0 удалений

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

@ -204,6 +204,10 @@ $JSEvents
在被标识的代码中,所有乘/除以`devicePixelRatio`都来自于我们的修改。
若您需要详细了解此插件所修改的脚本请参考您的Unity Editor安装目录下的`PlaybackEngines/WebGLSupport/BuildTools/lib`文件夹中的`SystemInfo.js`和`UnityNativeJS/UnityNative.js`。
#### 九、图片导入设置
默认情况下Unity会将导入图片的宽和高放缩为最近的等于2的幂的整数。
在UIWidgets中使用图片时记得将这一特性关闭以免图片被意外放缩方法如下在Project面板中选中图片在"Inspector"面板中将"Non Power of 2"(在"Advanced"中)设置为"None"。
## 调试UIWidgets应用程序
#### 定义UIWidgets_DEBUG

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

@ -236,6 +236,10 @@ If you still need the function provided by this plugin, you can mannually apply
All the modifications introduced in `UIWidgetsCanvasDevicePixelRatio` are marked by `////////// Modifcation Start ////////////` and `////////// Modifcation End ////////////`.
In the marked codes, all the multiplications and divisions with `devicePixelRatio` are introduced by our modification.
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.
#### Image Import Setting
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.
## Debug UIWidgets Application