Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit 2315504

Browse files
committed
Chinese version
1 parent f80cc7c commit 2315504

File tree

2 files changed

+33
-17
lines changed

2 files changed

+33
-17
lines changed

README-ZH.md

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ UIWidgets是Unity编辑器的一个插件包,可帮助开发人员通过Unity
77

88
UIWidgets主要来自[Flutter](https://github.com/flutter/flutter)。但UIWidgets通过使用强大的Unity引擎为开发人员提供了许多新功能,显著地改进他们开发的应用性能和工作流程。
99

10-
UIWidgets 2.0是UIWidgets的最新版本,它主要着力于UI绘制相关的整体性能优化。经测试,UIWidgets 2.0在iPhone 6等部分机型上的帧率相对1.0版本可以取得10%左右的提升。如果因为各种原因您还需要使用UIWidgets 1.0,请在Releases中下载对应的包或者使用uiwidgets_1.0分支。
10+
**UIWidgets 2.0**是UIWidgets的最新版本,它针对**中国版Unity**开发并主要着力于UI绘制相关的整体性能优化。经测试,UIWidgets 2.0在iPhone 6等部分机型上的帧率相对1.0版本可以取得**10%**左右的提升。
11+
12+
如果因为各种原因您还需要使用UIWidgets 1.0,请在Releases中下载对应的包或者使用uiwidgets_1.0分支。
1113

1214
#### 效率
1315
通过使用最新的Unity渲染SDK,UIWidgets应用可以非常快速地运行并且大多数时间保持大于60fps的速度。
@@ -41,16 +43,17 @@ UIWidgets 2.0是UIWidgets的最新版本,它主要着力于UI绘制相关的
4143
### 基于UIWidgets的项目
4244

4345
#### Unity Connect App
44-
Unity Connect App是使用UIWidgets开发的一个移动App产品,您随时可以在Android (https://unity.cn/connectApp/download)
46+
Unity Connect App是使用**UIWidgets 2.0**开发的一个移动App产品,您随时可以在Android (https://unity.cn/connectApp/download)
4547
以及iOS (Searching for "Unity Connect" in App Store)端下载到它最新的版本. 本项目的所有代码均开源@https://github.com/UnityTech/ConnectAppCN.
4648

4749
#### Unity中文官方文档
48-
Unity的线上中文官方文档由UIWidgets开发,您可以点击以下网址 https://connect.unity.com/doc 来访问它的全部内容。该项目目前已开源,所有代码可以在
50+
Unity的线上中文官方文档由UIWidgets 1.0开发,您可以点击以下网址 https://connect.unity.com/doc 来访问它的全部内容。该项目目前已开源,所有代码可以在
4951
https://github.com/UnityTech/DocCN 查看。
5052

5153
## 使用要求
5254

5355
#### Unity
56+
:warning: **注意:UIWidgets 2.0仅仅适用于中国版Unity**
5457

5558
UIWidgets的各个版本所需的Unity版本如下表所示。您可以从[https://unity.cn/releases](https://unity.cn/releases)下载最新的Unity。
5659

@@ -72,11 +75,15 @@ UIWidgets的各个版本所需的Unity版本如下表所示。您可以从[https
7275
cd <YourPackagePath>
7376
git clone https://github.com/Unity-Technologies/com.unity.uiwidgets.git com.unity.uiwidgets
7477
```
75-
在unity的PackageManager中,选择添加添加local file。选中```/com.unity.uiwidgets```下的```package.json```
78+
79+
此外,因为UIWidgets 2.0中为各个平台编译的C++动态库文件较大,我们使用了github提供的**Git Large File Storage**来管理它们以
80+
优化下载体验。为此,请您确保在下载UIWidgets前安装好该[服务](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage)以便正确下载动态库文件。
81+
82+
最后,在unity的PackageManager中,选择添加添加local file。选中```/com.unity.uiwidgets```下的```package.json```
7683

7784
#### 运行环境
7885

79-
UIWidgets目前暂时只支持MacOS(Metal),iOS(Metal),Android(Armv7,OpenGLes)以及 Windows(Direct3D11)。我们后续会针对更广泛的运行环境进行适配,敬请期待。
86+
**UIWidgets 2.0**目前暂时只支持MacOS(Metal),iOS(Metal),Android(Armv7,OpenGLes)以及 Windows(Direct3D11)。我们后续会针对更广泛的运行环境进行适配,敬请期待。与之相对的,UIWidgets 1.0目前支持所有Unity导出目标平台
8087

8188
## 入门指南
8289

@@ -245,16 +252,25 @@ using(Isolate.getScope(the isolate of your App)) {
245252

246253
#### 常问问题解答
247254

248-
| 问题 | 回答 |
249-
| :-----------------------------------------------| ---------------------: |
250-
| 我可以使用UIWidgets创建独立应用吗? | 可以 |
251-
| 我可以使用UIWidgets构建游戏UI吗? | 可以 |
252-
| 我可以使用UIWidgets开发Unity编辑器插件吗? | 可以 |
253-
| UIWidgets是UGUI / NGUI的扩展吗? | 不是 |
254-
| UIWidgets只是Flutter的副本吗? | 不是 |
255-
| 我可以通过简单的拖放操作来创建带有UIWidgets的UI吗? | 不可以 |
256-
| 我是否需要付费使用UIWidgets? | 不需要 |
257-
| 有推荐的适用于UIWidgets的IDE吗? | Rider, VSCode(Open .sln) |
255+
1. 在打开一个UIWidgets 2.0项目后Unity编辑器崩溃了。
256+
257+
请确定您使用的Unity编辑器版本兼容您使用的UIWidgets版本。例如,**UIWidgets 2.0.3**只支持以下中国版Unity版本:2019.4.26f1c1 ~ 2019.4.29f1c1。您可以在[这里](#unity)查找兼容您UIWidgets版本的Unity版本信息。
258+
259+
2. 在打开一个UIWidgets 2.0项目后Unity控制台报错,报错信息为**DllNotFoundException: libUIWidgets**
260+
261+
请首先检查您的UIWidgets根目录下/Runtime/Plugins中下载好的适配各个平台的C++库文件是否完整。例如,Windows平台下的libUIWidgets.ll位于*X86_64*子目录下,Mac平台下的libUIWidgets.dylib位于*osx*目录下。
262+
263+
如果您发现库文件不存在或者文件大小不正常(<1MB),请确认您已经在您电脑上安装了**Git Large File Storage**,然后在UIWidgets根目录下执行如下指令:
264+
```
265+
git lfs pull
266+
```
267+
268+
3. UIWidgets 2.0和UIWidgets 1.0的区别大吗?哪个更适合我的项目?
269+
270+
在UIWidgets 1.0中所有渲染相关代码都由C#编写并且使用了Unity [Graphics API](https://docs.unity3d.com/ScriptReference/Graphics.html)
271+
进行渲染。因此它可以正确运行在任意Unity支持的平台。不过与此同时,它的运行效率较低,且渲染效果与flutter在某一些细节上并不一致。
272+
273+
在UIWidgets 2.0中我们将一个flutter引擎嵌入到了C++动态库中,然后Unity通过调用这个动态库来进行渲染。因此,它的渲染结果与flutter完全一致,且性能比C#实现的渲染代码有明显提升。不过为了使flutter引擎和Unity可以正确协作,我们对flutter和Unity引擎都进行了一些修改。因此,目前UIWidgets 2.0只能够运行在包含上述修改的中国版Unity中,并且暂时只支持部分Unity的目标平台。
258274
259275
## 如何贡献
260276
请查看[CONTRIBUTING.md](CONTRIBUTING.md)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Specifically, the compatible Unity versions for each UIWidgets release are liste
7171
| -----------------------------------------------| ------------------------- | ------------------------- |
7272
| 1.5.4 and below | 2019.4.10f1 and above | N\A |
7373
| 2.0.1 | 2019.4.26f1c1 | N\A |
74-
| 2.0.2 and above | 2019.4.26f1c1 ~ 2019.4.32f1c1 | N\A |
74+
| 2.0.2 and above | 2019.4.26f1c1 ~ 2019.4.29f1c1 | N\A |
7575

7676
#### UIWidgets Package
7777
Visit our Github repository https://github.com/Unity-Technologies/com.unity.uiwidgets
@@ -282,7 +282,7 @@ this [section](#unity).
282282

283283
2. After openning a UIWidgets 2.0 project I receive an error **DllNotFoundException: libUIWidgets**.
284284

285-
Please make sure that the native libraries are correctly downloaded to your project. You can find them under *UIWidgetsPackageRoot*/Runtime/Plugins. For example, the libUIWidgets.dll under the sub folder */X86_64* is the native library for Windows and the libUIWidgets.dylib under *osx* is for Mac.
285+
Please make sure that the native libraries are correctly downloaded to your project. You can find them under *UIWidgetsPackageRoot*/Runtime/Plugins. For example, the libUIWidgets.dll under the sub folder *X86_64* is the native library for Windows and the libUIWidgets.dylib under *osx* is for Mac.
286286

287287
If the libraries are not there or their sizes are small (<1MB), please ensure that you have installed **Git Large File Storage** in your computer and then try the following command line inside the UIWidgets repository.
288288
```

0 commit comments

Comments
 (0)