浏览代码

Update README.

/main
Yuncong Zhang 6 年前
当前提交
77dcc34a
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 2
      README-ZH.md
  2. 2
      README.md

2
README-ZH.md


#### 八、WebGL Canvas分辨率调整插件
因为浏览器中Canvas的宽高和其在显示器上的像素数可能不一致,所以构建出的WebGL程序中画面可能会模糊。
插件`Plugins/platform/webgl/UIWidgetsCanvasDevicePixelRatio.jslib`解决了这个问题。
如果您因为任何原因需要禁止此插件,请在Project面板中选中该插件,在Inspector面板中的Define Constraints参数中,输入`ENABLE_CANVAS_DEVICE_PIXEL_RATIO_PLUGIN`(该宏默认没有被定义,从而使得此插件被禁用)
如果您因为任何原因需要禁止此插件,请在Project面板中选中该插件,在Inspector面板中的Define Constraints参数中,输入任意(没有被Unity定义为宏)的字符串(例如`ENABLE_CANVAS_DEVICE_PIXEL_RATIO_PLUGIN`),使得只有在Player Settings中定义了这个宏,此插件才会启用
此插件覆盖了Unity WebGL构建模块中的如下参数:
```

2
README.md


The width and height of the Canvas in browser may differ from the number of pixels the Canvas occupies on the screen.
Therefore, the image may blur in the builded WebGL program.
The Plugin `Plugins/platform/webgl/UIWidgetsCanvasDevicePixelRatio.jslib` solves this issue.
If you need to disable this plugin for any reason, please select this plugin in the **Project** panel, and put `ENABLE_CANVAS_DEVICE_PIXEL_RATIO_PLUGIN` (this is not defined by default, which renders this plugin disabled) in the **Define Constraints** field in the **Inspector** panel.
If you need to disable this plugin for any reason, please select this plugin in the **Project** panel, and put an arbitrary string (that is not defined as a macro by Unity) in the **Define Constraints** field in the **Inspector** panel (for example, `ENABLE_CANVAS_DEVICE_PIXEL_RATIO_PLUGIN`), so that the plugin is enabled only if this macro is defined in **Player Settings**, which effectively disables the plugin.
This plugin overrides the following parameters in the Unity WebGL building module:
```

正在加载...
取消
保存