Unity Connect 社区移动端 App (基于 UIWidgets 2.0)
$ git clone --recurse-submodules https://github.com/UIWidgets/ConnectAppCN2.git
$ cd ConnectAppCN2/或者
$ git clone https://github.com/UIWidgets/ConnectAppCN2.git
$ cd ConnectAppCN2/
$ git submodule init
$ git submodule update- 使用 Unity Editor(推荐 Editor 版本: Unity 2019.4.32f1c1)打开项目目录
ConnectAppCN2/。 - 在 Unity Editor 界面的
Project选项卡中找到Assets/ConnectApp/Main文件目录。 - 双击
ConnectApp.unity文件,可以预览项目的预载显示效果。 - 双击
ConnectAppPanel.cs文件,以唤起代码编辑软件(例如:Rider)。 - 单击
播放按钮后,在Game窗口查看项目运行效果。
如果项目运行时有
Game窗口中显示 "No cameras rendering" 字样提示的话,可以在Game窗口左上角菜单中去除勾选 "Warn if No cameras rendering" 即可消除。
- 在顶部菜单找到
Flie->Build Settings-> Switch Platform Android。 - 然后在
Build Settings弹框中勾选Export Project选项。然后点击Export按钮导出到你指定的文件夹内(例如:AndroidProject/)。 - 通过 Android Studio 打开安卓项目目录
<你的指定文件夹>/Unity Connect。 - 进入到 Android Studio 后,你就可以在 Android 模拟器或者真机中运行项目了。
- 在顶部菜单找到
Flie->Build Settings-> Switch Platform iOS。 - 项目中默认的配置是运行在 iOS 真机。如果想在 iOS 模拟器中运行,需要进行如下设置。
- 找到菜单中的
Edit->Project Settings->Player->Other Settings。 - 取消选中
Auto Graphics API,然后在Graphics APIs列表中添加OpenGLES2和OpenGLES3。 Target SDK选择Simulator SDK。
- 找到菜单中的
- 在
Build Settings弹窗中点击Export按钮导出到你指定的文件夹内(例如:iOSProject/)。 - 双击
Unity-iPhone.xcodeproj文件打开项目。 - 如果在真机上运行可能需要修改
info.plist中Bundle identifier。 - 如果在模拟器运行需要在
Editor中进行 2. 中的步骤,然后导出项目。







