From 0d45a81062e87b8a0be6f76effeae639afb5a9c3 Mon Sep 17 00:00:00 2001 From: Xingwei Zhu Date: Fri, 3 Dec 2021 14:49:49 +0800 Subject: [PATCH 01/10] English version step 1 --- README.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3181b5d5..13894697 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,9 @@ UIWidgets is mainly derived from [Flutter](https://github.com/flutter/flutter). the powerful Unity Engine, it offers developers many new features to improve their Apps as well as the develop workflow significantly. -As the latest version, UIWidgets 2.0 aims to optimize the overall performance of the package. Specifically, a performance gain around 10% is observed on mobile devices like iPhone 6 after upgrading to UIWidgets 2.0. However, if you still want to use the original UIWidgets 1.0, please download the archived packages from Releases or switch your working branch to uiwidgets_1.0. +**UIWidgets 2.0** is developed for **Unity China version** and aims to **optimize the overall performance of the package**. Specifically, a performance gain around **10%** is observed on mobile devices like iPhone 6 after upgrading to UIWidgets 2.0. + +If you still want to use the original UIWidgets 1.0, please download the archived packages from Releases or switch your working branch to uiwidgets_1.0. #### Efficiency Using the latest Unity rendering SDKs, a UIWidgets App can run very fast and keep >60fps in most times. @@ -50,18 +52,20 @@ CPU/GPU Profiling, FPS Profiling. ### Projects using UIWidgets #### Unity Connect App -The Unity Connect App is created using UIWidgets and available for both Android (https://unity.cn/connectApp/download) +The Unity Connect App is created using **UIWidgets 2.0** and available for both Android (https://unity.cn/connectApp/download) and iOS (Searching for "Unity Connect" in App Store). This project is open-sourced @https://github.com/UnityTech/ConnectAppCN. #### Unity Chinese Doc -The official website of Unity Chinese Documentation (https://connect.unity.com/doc) is powered by UIWidgets and +The official website of Unity Chinese Documentation (https://connect.unity.com/doc) is powered by UIWidgets 1.0 and open-sourced @https://github.com/UnityTech/DocCN. ## Requirements #### Unity -The compatible Unity versions for each UIWidgets release are listed below. You can download the latest Unity on [https://unity.cn/releases](https://unity.cn/releases). +:warning: **UIWidgets 2.0 are only compatible with Unity China version** + +Specifically, the compatible Unity versions for each UIWidgets release are listed below. You can download the latest Unity on [https://unity.cn/releases](https://unity.cn/releases). | UIWidgets version | Unity 2019 LTS | Unity 2020 LTS | | -----------------------------------------------| ------------------------- | ------------------------- | @@ -82,11 +86,14 @@ Generally, you can make it using a console (or terminal) application by just a f git clone https://github.com/Unity-Technologies/com.unity.uiwidgets.git com.unity.uiwidgets ``` -In PackageManger of unity, select add local file. select ```package.json``` under ```/com.unity.uiwidgets``` +Note that there are many native libraries we built for UIWidget 2.0 to boost its performance, which are large files and hosted by +**Git Large File Storage**. You need to install [this service](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage) first and then use it to fetch these libraries. + +Finally, in PackageManger of unity, select add local file. select ```package.json``` under ```/com.unity.uiwidgets``` #### Runtime Environment -Currently UIWidgets only supports MacOS(Metal), iOS(Metal), Android(Armv7, OpenGLes) and Windows(Direct3D11). More devices will be supported in the future. +:warning: Though UIWidgets 1.0 is compatible to all platforms like MacOS, iOS, Android, Windows and Webgl, currently **UIWidgets 2.0** only supports MacOS(Metal), iOS(Metal), Android(OpenGLes) and Windows(Direct3D11). More devices will be supported in the future. ## Getting Start From dbe6a66b45a125e1aa90026773712f5f650332ed Mon Sep 17 00:00:00 2001 From: Xingwei Zhu Date: Fri, 3 Dec 2021 15:38:51 +0800 Subject: [PATCH 02/10] update English readme step 2 --- README.md | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 13894697..38cd8e39 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ UIWidgets is mainly derived from [Flutter](https://github.com/flutter/flutter). the powerful Unity Engine, it offers developers many new features to improve their Apps as well as the develop workflow significantly. -**UIWidgets 2.0** is developed for **Unity China version** and aims to **optimize the overall performance of the package**. Specifically, a performance gain around **10%** is observed on mobile devices like iPhone 6 after upgrading to UIWidgets 2.0. +**UIWidgets 2.0** is developed for **Unity China version** deliberately and aims to **optimize the overall performance of the package**. Specifically, a performance gain around **10%** is observed on mobile devices like iPhone 6 after upgrading to UIWidgets 2.0. If you still want to use the original UIWidgets 1.0, please download the archived packages from Releases or switch your working branch to uiwidgets_1.0. @@ -71,7 +71,7 @@ Specifically, the compatible Unity versions for each UIWidgets release are liste | -----------------------------------------------| ------------------------- | ------------------------- | | 1.5.4 and below | 2019.4.10f1 and above | N\A | | 2.0.1 | 2019.4.26f1c1 | N\A | -| 2.0.2 and above | 2019.4.26f1c1 ~ 2019.4.29f1c1 | N\A | +| 2.0.2 and above | 2019.4.26f1c1 ~ 2019.4.32f1c1 | N\A | #### UIWidgets Package Visit our Github repository https://github.com/Unity-Technologies/com.unity.uiwidgets @@ -93,7 +93,7 @@ Finally, in PackageManger of unity, select add local file. select ```package.jso #### Runtime Environment -:warning: Though UIWidgets 1.0 is compatible to all platforms like MacOS, iOS, Android, Windows and Webgl, currently **UIWidgets 2.0** only supports MacOS(Metal), iOS(Metal), Android(OpenGLes) and Windows(Direct3D11). More devices will be supported in the future. +:warning: Though UIWidgets 1.0 is compatible to all platforms, currently **UIWidgets 2.0** only supports MacOS(Metal), iOS(Metal), Android(OpenGLes) and Windows(Direct3D11). More devices will be supported in the future. ## Getting Start @@ -274,16 +274,28 @@ Meanwhile, you can join our [discussion channel](https://unity.cn/plate/uiwidget #### FAQ -| Question | Answer | -| :-----------------------------------------------| ---------------------: | -| Can I create standalone App using UIWidgets? | **Yes** | -| Can I use UIWidgets to build game UIs? | **Yes** | -| Can I develop Unity Editor plugins using UIWidgets? | **Yes** | -| Is UIWidgets a extension of UGUI/NGUI? | **No** | -| Is UIWidgets just a copy of Flutter? | **No** | -| Can I create UI with UIWidgets by simply drag&drop? | **No** | -| Do I have to pay for using UIWidgets? | **No** | -| Any IDE recommendation for UIWidgets? | **Rider, VSCode(Open .sln)** | +* The editor crashes when openning a UIWidgets 2.0 project, e.g., the Sample projects. + +Please make sure that you are using campatible Unity versions to the specific UIWidgets version. For example, **UIWidgets 2.0.3** is only supported on Unity China version between 2019.4.26f1c1 and 2019.4.29f1c1. You can find the detailed information in +this [section](####-UIWidgets). + + +* After openning a UIWidgets 2.0 project I receive an error **DllNotFoundException: libUIWidgets**. + +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. + +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. +``` +git lfs pull +``` + +* What the difference between UIWidgets 2.0 and UIWidgets 1.0 ? + +In UIWidgets 1.0 we used Unity [Graphics API](https://docs.unity3d.com/ScriptReference/Graphics.html) for the rendering and all rendering codes are writen in C#. Therefore it is able to run freely on all platforms that Unity supports but relatively slow. The rendering result is also not exactly the same as in flutter due to the difference between Uniy rendering engine and flutter engine. + +In UIWidgets 2.0, we wrapped the flutter engine inside native libraries which is writen in C++ and used it to render on Unity Textures. Its rendering result is the same as in flutter and the performance is also better. However, in order to ensure that the flutter engine works properly along with Unity, we modified both the flutter engine and Unity Engine codes. As the result, +UIWidgets 2.0 can only run on specific Unity versions, i.e., Unity China version and support only part of the build targets of Unity for now. ## How to Contribute From 3aefb6881a3b305c33d2757b675728d37dbba667 Mon Sep 17 00:00:00 2001 From: Xingwei Zhu Date: Fri, 3 Dec 2021 15:46:02 +0800 Subject: [PATCH 03/10] some fixes --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 38cd8e39..f3d5b40d 100644 --- a/README.md +++ b/README.md @@ -277,7 +277,7 @@ Meanwhile, you can join our [discussion channel](https://unity.cn/plate/uiwidget * The editor crashes when openning a UIWidgets 2.0 project, e.g., the Sample projects. Please make sure that you are using campatible Unity versions to the specific UIWidgets version. For example, **UIWidgets 2.0.3** is only supported on Unity China version between 2019.4.26f1c1 and 2019.4.29f1c1. You can find the detailed information in -this [section](####-UIWidgets). +this [section](#unity). * After openning a UIWidgets 2.0 project I receive an error **DllNotFoundException: libUIWidgets**. @@ -292,10 +292,10 @@ git lfs pull * What the difference between UIWidgets 2.0 and UIWidgets 1.0 ? -In UIWidgets 1.0 we used Unity [Graphics API](https://docs.unity3d.com/ScriptReference/Graphics.html) for the rendering and all rendering codes are writen in C#. Therefore it is able to run freely on all platforms that Unity supports but relatively slow. The rendering result is also not exactly the same as in flutter due to the difference between Uniy rendering engine and flutter engine. +In UIWidgets 1.0 we used Unity [Graphics API](https://docs.unity3d.com/ScriptReference/Graphics.html) for the rendering and all rendering codes are writen in C#. Therefore it is able to run freely on all platforms that Unity supports but relatively slow. The rendering result is also not exactly the same as in flutter due to the difference between the Unity rendering engine and flutter engine. -In UIWidgets 2.0, we wrapped the flutter engine inside native libraries which is writen in C++ and used it to render on Unity Textures. Its rendering result is the same as in flutter and the performance is also better. However, in order to ensure that the flutter engine works properly along with Unity, we modified both the flutter engine and Unity Engine codes. As the result, -UIWidgets 2.0 can only run on specific Unity versions, i.e., Unity China version and support only part of the build targets of Unity for now. +In UIWidgets 2.0, we wrapped the flutter engine inside a native library which is writen in C++ and used it to render on Unity Textures. Its rendering result is the same as in flutter and the performance is also better. However, in order to ensure that the flutter engine works properly along with Unity, we modified both the flutter and Unity Engine. As the result, +currently UIWidgets 2.0 can only run on specific Unity versions, i.e., Unity China version and supports only part of the build targets of Unity. ## How to Contribute From 44d300f49aded5aa710a4220b8e9debd5f474794 Mon Sep 17 00:00:00 2001 From: Xingwei Zhu Date: Fri, 3 Dec 2021 15:54:33 +0800 Subject: [PATCH 04/10] try fix format --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f3d5b40d..f7360838 100644 --- a/README.md +++ b/README.md @@ -274,23 +274,22 @@ Meanwhile, you can join our [discussion channel](https://unity.cn/plate/uiwidget #### FAQ -* The editor crashes when openning a UIWidgets 2.0 project, e.g., the Sample projects. +1. The editor crashes when openning a UIWidgets 2.0 project, e.g., the Sample projects. Please make sure that you are using campatible Unity versions to the specific UIWidgets version. For example, **UIWidgets 2.0.3** is only supported on Unity China version between 2019.4.26f1c1 and 2019.4.29f1c1. You can find the detailed information in this [section](#unity). -* After openning a UIWidgets 2.0 project I receive an error **DllNotFoundException: libUIWidgets**. +2. After openning a UIWidgets 2.0 project I receive an error **DllNotFoundException: libUIWidgets**. -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. +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. 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. ``` git lfs pull ``` -* What the difference between UIWidgets 2.0 and UIWidgets 1.0 ? +3. What the difference between UIWidgets 2.0 and UIWidgets 1.0 ? In UIWidgets 1.0 we used Unity [Graphics API](https://docs.unity3d.com/ScriptReference/Graphics.html) for the rendering and all rendering codes are writen in C#. Therefore it is able to run freely on all platforms that Unity supports but relatively slow. The rendering result is also not exactly the same as in flutter due to the difference between the Unity rendering engine and flutter engine. From 47d032d96c733539c531121a5eb7a2e9799fef8b Mon Sep 17 00:00:00 2001 From: Xingwei Zhu Date: Fri, 3 Dec 2021 15:56:02 +0800 Subject: [PATCH 05/10] fix --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f7360838..dce9a5fe 100644 --- a/README.md +++ b/README.md @@ -276,24 +276,24 @@ Meanwhile, you can join our [discussion channel](https://unity.cn/plate/uiwidget 1. The editor crashes when openning a UIWidgets 2.0 project, e.g., the Sample projects. -Please make sure that you are using campatible Unity versions to the specific UIWidgets version. For example, **UIWidgets 2.0.3** is only supported on Unity China version between 2019.4.26f1c1 and 2019.4.29f1c1. You can find the detailed information in + Please make sure that you are using campatible Unity versions to the specific UIWidgets version. For example, **UIWidgets 2.0.3** is only supported on Unity China version between 2019.4.26f1c1 and 2019.4.29f1c1. You can find the detailed information in this [section](#unity). 2. After openning a UIWidgets 2.0 project I receive an error **DllNotFoundException: libUIWidgets**. -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. + 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. -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. + 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. ``` git lfs pull ``` 3. What the difference between UIWidgets 2.0 and UIWidgets 1.0 ? -In UIWidgets 1.0 we used Unity [Graphics API](https://docs.unity3d.com/ScriptReference/Graphics.html) for the rendering and all rendering codes are writen in C#. Therefore it is able to run freely on all platforms that Unity supports but relatively slow. The rendering result is also not exactly the same as in flutter due to the difference between the Unity rendering engine and flutter engine. + In UIWidgets 1.0 we used Unity [Graphics API](https://docs.unity3d.com/ScriptReference/Graphics.html) for the rendering and all rendering codes are writen in C#. Therefore it is able to run freely on all platforms that Unity supports but relatively slow. The rendering result is also not exactly the same as in flutter due to the difference between the Unity rendering engine and flutter engine. -In UIWidgets 2.0, we wrapped the flutter engine inside a native library which is writen in C++ and used it to render on Unity Textures. Its rendering result is the same as in flutter and the performance is also better. However, in order to ensure that the flutter engine works properly along with Unity, we modified both the flutter and Unity Engine. As the result, + In UIWidgets 2.0, we wrapped the flutter engine inside a native library which is writen in C++ and used it to render on Unity Textures. Its rendering result is the same as in flutter and the performance is also better. However, in order to ensure that the flutter engine works properly along with Unity, we modified both the flutter and Unity Engine. As the result, currently UIWidgets 2.0 can only run on specific Unity versions, i.e., Unity China version and supports only part of the build targets of Unity. ## How to Contribute From c600d43e5b07c2a316ccb0aaa929fcd37a8f7c0d Mon Sep 17 00:00:00 2001 From: Xingwei Zhu Date: Fri, 3 Dec 2021 15:58:08 +0800 Subject: [PATCH 06/10] another try --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dce9a5fe..8932c140 100644 --- a/README.md +++ b/README.md @@ -276,7 +276,7 @@ Meanwhile, you can join our [discussion channel](https://unity.cn/plate/uiwidget 1. The editor crashes when openning a UIWidgets 2.0 project, e.g., the Sample projects. - Please make sure that you are using campatible Unity versions to the specific UIWidgets version. For example, **UIWidgets 2.0.3** is only supported on Unity China version between 2019.4.26f1c1 and 2019.4.29f1c1. You can find the detailed information in + Please make sure that you are using campatible Unity versions to the specific UIWidgets version. For example, **UIWidgets 2.0.3** is only supported on Unity China version between 2019.4.26f1c1 and 2019.4.29f1c1. You can find the detailed information in this [section](#unity). From 42d0c6ff1aa8b71c8132734508941e5b901aa15e Mon Sep 17 00:00:00 2001 From: Xingwei Zhu Date: Fri, 3 Dec 2021 15:59:46 +0800 Subject: [PATCH 07/10] final fix --- README.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 8932c140..bdd29f19 100644 --- a/README.md +++ b/README.md @@ -274,27 +274,26 @@ Meanwhile, you can join our [discussion channel](https://unity.cn/plate/uiwidget #### FAQ -1. The editor crashes when openning a UIWidgets 2.0 project, e.g., the Sample projects. +**1.** The editor crashes when openning a UIWidgets 2.0 project, e.g., the Sample projects. Please make sure that you are using campatible Unity versions to the specific UIWidgets version. For example, **UIWidgets 2.0.3** is only supported on Unity China version between 2019.4.26f1c1 and 2019.4.29f1c1. You can find the detailed information in this [section](#unity). -2. After openning a UIWidgets 2.0 project I receive an error **DllNotFoundException: libUIWidgets**. +**2.** After openning a UIWidgets 2.0 project I receive an error **DllNotFoundException: libUIWidgets**. - 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. + 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. - 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. -``` -git lfs pull -``` + 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. + ``` + git lfs pull + ``` -3. What the difference between UIWidgets 2.0 and UIWidgets 1.0 ? +**3.** What the difference between UIWidgets 2.0 and UIWidgets 1.0 ? - In UIWidgets 1.0 we used Unity [Graphics API](https://docs.unity3d.com/ScriptReference/Graphics.html) for the rendering and all rendering codes are writen in C#. Therefore it is able to run freely on all platforms that Unity supports but relatively slow. The rendering result is also not exactly the same as in flutter due to the difference between the Unity rendering engine and flutter engine. + In UIWidgets 1.0 we used Unity [Graphics API](https://docs.unity3d.com/ScriptReference/Graphics.html) for the rendering and all rendering codes are writen in C#. Therefore it is able to run freely on all platforms that Unity supports but relatively slow. The rendering result is also not exactly the same as in flutter due to the difference between the Unity rendering engine and flutter engine. - In UIWidgets 2.0, we wrapped the flutter engine inside a native library which is writen in C++ and used it to render on Unity Textures. Its rendering result is the same as in flutter and the performance is also better. However, in order to ensure that the flutter engine works properly along with Unity, we modified both the flutter and Unity Engine. As the result, -currently UIWidgets 2.0 can only run on specific Unity versions, i.e., Unity China version and supports only part of the build targets of Unity. + In UIWidgets 2.0, we wrapped the flutter engine inside a native library which is writen in C++ and used it to render on Unity Textures. Its rendering result is the same as in flutter and the performance is also better. However, in order to ensure that the flutter engine works properly along with Unity, we modified both the flutter and Unity Engine. As the result, currently UIWidgets 2.0 can only run on specific Unity versions, i.e., Unity China version and supports only part of the build targets of Unity. ## How to Contribute From f80cc7c0c34dcd7617078d4b9fe913cf996d7daf Mon Sep 17 00:00:00 2001 From: Xingwei Zhu Date: Fri, 3 Dec 2021 16:00:56 +0800 Subject: [PATCH 08/10] fix --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bdd29f19..719df9a7 100644 --- a/README.md +++ b/README.md @@ -274,13 +274,13 @@ Meanwhile, you can join our [discussion channel](https://unity.cn/plate/uiwidget #### FAQ -**1.** The editor crashes when openning a UIWidgets 2.0 project, e.g., the Sample projects. +1. The editor crashes when openning a UIWidgets 2.0 project, e.g., the Sample projects. Please make sure that you are using campatible Unity versions to the specific UIWidgets version. For example, **UIWidgets 2.0.3** is only supported on Unity China version between 2019.4.26f1c1 and 2019.4.29f1c1. You can find the detailed information in this [section](#unity). -**2.** After openning a UIWidgets 2.0 project I receive an error **DllNotFoundException: libUIWidgets**. +2. After openning a UIWidgets 2.0 project I receive an error **DllNotFoundException: libUIWidgets**. 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. @@ -289,7 +289,7 @@ this [section](#unity). git lfs pull ``` -**3.** What the difference between UIWidgets 2.0 and UIWidgets 1.0 ? +3. What the difference between UIWidgets 2.0 and UIWidgets 1.0 ? In UIWidgets 1.0 we used Unity [Graphics API](https://docs.unity3d.com/ScriptReference/Graphics.html) for the rendering and all rendering codes are writen in C#. Therefore it is able to run freely on all platforms that Unity supports but relatively slow. The rendering result is also not exactly the same as in flutter due to the difference between the Unity rendering engine and flutter engine. From 231550451037e8553be5d2a0b3b0feb3c01e2b91 Mon Sep 17 00:00:00 2001 From: Xingwei Zhu Date: Fri, 3 Dec 2021 16:25:42 +0800 Subject: [PATCH 09/10] Chinese version --- README-ZH.md | 46 +++++++++++++++++++++++++++++++--------------- README.md | 4 ++-- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/README-ZH.md b/README-ZH.md index 172991e3..035f6cf4 100644 --- a/README-ZH.md +++ b/README-ZH.md @@ -7,7 +7,9 @@ UIWidgets是Unity编辑器的一个插件包,可帮助开发人员通过Unity UIWidgets主要来自[Flutter](https://github.com/flutter/flutter)。但UIWidgets通过使用强大的Unity引擎为开发人员提供了许多新功能,显著地改进他们开发的应用性能和工作流程。 -UIWidgets 2.0是UIWidgets的最新版本,它主要着力于UI绘制相关的整体性能优化。经测试,UIWidgets 2.0在iPhone 6等部分机型上的帧率相对1.0版本可以取得10%左右的提升。如果因为各种原因您还需要使用UIWidgets 1.0,请在Releases中下载对应的包或者使用uiwidgets_1.0分支。 +**UIWidgets 2.0**是UIWidgets的最新版本,它针对**中国版Unity**开发并主要着力于UI绘制相关的整体性能优化。经测试,UIWidgets 2.0在iPhone 6等部分机型上的帧率相对1.0版本可以取得**10%**左右的提升。 + +如果因为各种原因您还需要使用UIWidgets 1.0,请在Releases中下载对应的包或者使用uiwidgets_1.0分支。 #### 效率 通过使用最新的Unity渲染SDK,UIWidgets应用可以非常快速地运行并且大多数时间保持大于60fps的速度。 @@ -41,16 +43,17 @@ UIWidgets 2.0是UIWidgets的最新版本,它主要着力于UI绘制相关的 ### 基于UIWidgets的项目 #### Unity Connect App -Unity Connect App是使用UIWidgets开发的一个移动App产品,您随时可以在Android (https://unity.cn/connectApp/download) +Unity Connect App是使用**UIWidgets 2.0**开发的一个移动App产品,您随时可以在Android (https://unity.cn/connectApp/download) 以及iOS (Searching for "Unity Connect" in App Store)端下载到它最新的版本. 本项目的所有代码均开源@https://github.com/UnityTech/ConnectAppCN. #### Unity中文官方文档 -Unity的线上中文官方文档由UIWidgets开发,您可以点击以下网址 https://connect.unity.com/doc 来访问它的全部内容。该项目目前已开源,所有代码可以在 +Unity的线上中文官方文档由UIWidgets 1.0开发,您可以点击以下网址 https://connect.unity.com/doc 来访问它的全部内容。该项目目前已开源,所有代码可以在 https://github.com/UnityTech/DocCN 查看。 ## 使用要求 #### Unity +:warning: **注意:UIWidgets 2.0仅仅适用于中国版Unity** UIWidgets的各个版本所需的Unity版本如下表所示。您可以从[https://unity.cn/releases](https://unity.cn/releases)下载最新的Unity。 @@ -72,11 +75,15 @@ UIWidgets的各个版本所需的Unity版本如下表所示。您可以从[https cd git clone https://github.com/Unity-Technologies/com.unity.uiwidgets.git com.unity.uiwidgets ``` -在unity的PackageManager中,选择添加添加local file。选中```/com.unity.uiwidgets```下的```package.json```。 + +此外,因为UIWidgets 2.0中为各个平台编译的C++动态库文件较大,我们使用了github提供的**Git Large File Storage**来管理它们以 +优化下载体验。为此,请您确保在下载UIWidgets前安装好该[服务](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage)以便正确下载动态库文件。 + +最后,在unity的PackageManager中,选择添加添加local file。选中```/com.unity.uiwidgets```下的```package.json```。 #### 运行环境 -UIWidgets目前暂时只支持MacOS(Metal),iOS(Metal),Android(Armv7,OpenGLes)以及 Windows(Direct3D11)。我们后续会针对更广泛的运行环境进行适配,敬请期待。 +**UIWidgets 2.0**目前暂时只支持MacOS(Metal),iOS(Metal),Android(Armv7,OpenGLes)以及 Windows(Direct3D11)。我们后续会针对更广泛的运行环境进行适配,敬请期待。与之相对的,UIWidgets 1.0目前支持所有Unity导出目标平台。 ## 入门指南 @@ -245,16 +252,25 @@ using(Isolate.getScope(the isolate of your App)) { #### 常问问题解答 -| 问题 | 回答 | -| :-----------------------------------------------| ---------------------: | -| 我可以使用UIWidgets创建独立应用吗? | 可以 | -| 我可以使用UIWidgets构建游戏UI吗? | 可以 | -| 我可以使用UIWidgets开发Unity编辑器插件吗? | 可以 | -| UIWidgets是UGUI / NGUI的扩展吗? | 不是 | -| UIWidgets只是Flutter的副本吗? | 不是 | -| 我可以通过简单的拖放操作来创建带有UIWidgets的UI吗? | 不可以 | -| 我是否需要付费使用UIWidgets? | 不需要 | -| 有推荐的适用于UIWidgets的IDE吗? | Rider, VSCode(Open .sln) | +1. 在打开一个UIWidgets 2.0项目后Unity编辑器崩溃了。 + + 请确定您使用的Unity编辑器版本兼容您使用的UIWidgets版本。例如,**UIWidgets 2.0.3**只支持以下中国版Unity版本:2019.4.26f1c1 ~ 2019.4.29f1c1。您可以在[这里](#unity)查找兼容您UIWidgets版本的Unity版本信息。 + +2. 在打开一个UIWidgets 2.0项目后Unity控制台报错,报错信息为**DllNotFoundException: libUIWidgets**。 + + 请首先检查您的UIWidgets根目录下/Runtime/Plugins中下载好的适配各个平台的C++库文件是否完整。例如,Windows平台下的libUIWidgets.ll位于*X86_64*子目录下,Mac平台下的libUIWidgets.dylib位于*osx*目录下。 + + 如果您发现库文件不存在或者文件大小不正常(<1MB),请确认您已经在您电脑上安装了**Git Large File Storage**,然后在UIWidgets根目录下执行如下指令: + ``` + git lfs pull + ``` + +3. UIWidgets 2.0和UIWidgets 1.0的区别大吗?哪个更适合我的项目? + + 在UIWidgets 1.0中所有渲染相关代码都由C#编写并且使用了Unity [Graphics API](https://docs.unity3d.com/ScriptReference/Graphics.html) + 进行渲染。因此它可以正确运行在任意Unity支持的平台。不过与此同时,它的运行效率较低,且渲染效果与flutter在某一些细节上并不一致。 + + 在UIWidgets 2.0中我们将一个flutter引擎嵌入到了C++动态库中,然后Unity通过调用这个动态库来进行渲染。因此,它的渲染结果与flutter完全一致,且性能比C#实现的渲染代码有明显提升。不过为了使flutter引擎和Unity可以正确协作,我们对flutter和Unity引擎都进行了一些修改。因此,目前UIWidgets 2.0只能够运行在包含上述修改的中国版Unity中,并且暂时只支持部分Unity的目标平台。 ## 如何贡献 请查看[CONTRIBUTING.md](CONTRIBUTING.md) diff --git a/README.md b/README.md index 719df9a7..ac2e7146 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Specifically, the compatible Unity versions for each UIWidgets release are liste | -----------------------------------------------| ------------------------- | ------------------------- | | 1.5.4 and below | 2019.4.10f1 and above | N\A | | 2.0.1 | 2019.4.26f1c1 | N\A | -| 2.0.2 and above | 2019.4.26f1c1 ~ 2019.4.32f1c1 | N\A | +| 2.0.2 and above | 2019.4.26f1c1 ~ 2019.4.29f1c1 | N\A | #### UIWidgets Package Visit our Github repository https://github.com/Unity-Technologies/com.unity.uiwidgets @@ -282,7 +282,7 @@ this [section](#unity). 2. After openning a UIWidgets 2.0 project I receive an error **DllNotFoundException: libUIWidgets**. - 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. + 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. 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. ``` From 1276f967c70add386963d098a51e9730cde91bbd Mon Sep 17 00:00:00 2001 From: Xingwei Zhu Date: Fri, 3 Dec 2021 16:36:47 +0800 Subject: [PATCH 10/10] minor fixes --- README-ZH.md | 6 ++++-- README.md | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README-ZH.md b/README-ZH.md index 035f6cf4..267f984e 100644 --- a/README-ZH.md +++ b/README-ZH.md @@ -7,7 +7,7 @@ UIWidgets是Unity编辑器的一个插件包,可帮助开发人员通过Unity UIWidgets主要来自[Flutter](https://github.com/flutter/flutter)。但UIWidgets通过使用强大的Unity引擎为开发人员提供了许多新功能,显著地改进他们开发的应用性能和工作流程。 -**UIWidgets 2.0**是UIWidgets的最新版本,它针对**中国版Unity**开发并主要着力于UI绘制相关的整体性能优化。经测试,UIWidgets 2.0在iPhone 6等部分机型上的帧率相对1.0版本可以取得**10%**左右的提升。 +**UIWidgets 2.0**是UIWidgets的最新版本,它针对**中国版Unity**开发并主要着力于UI绘制相关的整体性能优化。经测试,UIWidgets 2.0在iPhone 6等部分机型上的帧率相对1.0版本可以取得10%左右的提升。 如果因为各种原因您还需要使用UIWidgets 1.0,请在Releases中下载对应的包或者使用uiwidgets_1.0分支。 @@ -258,7 +258,7 @@ using(Isolate.getScope(the isolate of your App)) { 2. 在打开一个UIWidgets 2.0项目后Unity控制台报错,报错信息为**DllNotFoundException: libUIWidgets**。 - 请首先检查您的UIWidgets根目录下/Runtime/Plugins中下载好的适配各个平台的C++库文件是否完整。例如,Windows平台下的libUIWidgets.ll位于*X86_64*子目录下,Mac平台下的libUIWidgets.dylib位于*osx*目录下。 + 请首先检查您的UIWidgets根目录下/Runtime/Plugins中适配各个平台的C++库文件是否完整。例如,Windows平台下的libUIWidgets.dll位于*X86_64*子目录下,Mac平台下的libUIWidgets.dylib位于*osx*目录下。 如果您发现库文件不存在或者文件大小不正常(<1MB),请确认您已经在您电脑上安装了**Git Large File Storage**,然后在UIWidgets根目录下执行如下指令: ``` @@ -272,5 +272,7 @@ using(Isolate.getScope(the isolate of your App)) { 在UIWidgets 2.0中我们将一个flutter引擎嵌入到了C++动态库中,然后Unity通过调用这个动态库来进行渲染。因此,它的渲染结果与flutter完全一致,且性能比C#实现的渲染代码有明显提升。不过为了使flutter引擎和Unity可以正确协作,我们对flutter和Unity引擎都进行了一些修改。因此,目前UIWidgets 2.0只能够运行在包含上述修改的中国版Unity中,并且暂时只支持部分Unity的目标平台。 + 由于UIWidgets 2.0在效果和效率上的优势,因此推荐大家使用。仅当您需要在UIWidgets 2.0暂时不支持的平台(如webgl)上开发时才推荐使用UIWidgets 1.0。此外,由于人力原因,目前只有UIWidgets 2.0我们会持续更新。 + ## 如何贡献 请查看[CONTRIBUTING.md](CONTRIBUTING.md) diff --git a/README.md b/README.md index ac2e7146..22164cea 100644 --- a/README.md +++ b/README.md @@ -289,12 +289,14 @@ this [section](#unity). git lfs pull ``` -3. What the difference between UIWidgets 2.0 and UIWidgets 1.0 ? +3. What is the difference between UIWidgets 2.0 and UIWidgets 1.0 ? In UIWidgets 1.0 we used Unity [Graphics API](https://docs.unity3d.com/ScriptReference/Graphics.html) for the rendering and all rendering codes are writen in C#. Therefore it is able to run freely on all platforms that Unity supports but relatively slow. The rendering result is also not exactly the same as in flutter due to the difference between the Unity rendering engine and flutter engine. In UIWidgets 2.0, we wrapped the flutter engine inside a native library which is writen in C++ and used it to render on Unity Textures. Its rendering result is the same as in flutter and the performance is also better. However, in order to ensure that the flutter engine works properly along with Unity, we modified both the flutter and Unity Engine. As the result, currently UIWidgets 2.0 can only run on specific Unity versions, i.e., Unity China version and supports only part of the build targets of Unity. + For better rendering result, performance and continuous upgrade and support, you are always suggested to use UIWidgets 2.0 for your project. Use UIWidgets 1.0 only if you need to support specific target platforms like webgl. + ## How to Contribute Check [CONTRIBUTING.md](CONTRIBUTING.md)