macOS上搭建Flutter环境并编译到iOS

需要测试一个基于Flutter编写的项目,于是走上了搭建Flutter环境之旅,虽然不难,但是首次搭建还是挺繁琐的.因为某些原因,我们访问Flutter会有些网络麻烦,可以把Flutter的镜像更新为中国开发者专用的,打开终端输入如下命令:

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

去官网下载一份Flutter最新的SDK包:https://flutter.dev/docs/development/tools/sdk/releases#macos

解压到一个固定目录,比如 ~/development 下,注:~代表当前登录用户文件夹.解压后完整目录如 ~/development/flutter.

继续阅读

UE4构建时出”System.ArgumentException: 已添加了具有相同键的项”错误的解决

构建UE项目时报相同键的错误,网上搜大多数的解决方案是删除Intermediate文件夹及更改”*.uproject”的名字.再就是搜索”*.Target”把“之前的工程名.cs” 、“之前的工程名.target”的文件删除后重新打包.

而我当前测试的项目是纯蓝图项目没有解决,反复测试后发现因为Plugin中的插件导致,进一步排查后发现是安装了不同版本的相同插件导致,如项目中有A_v1插件,引擎插件目录中有A_v2插件.解决方案是移除引擎插件目录下的同名插件.

UATHelper: Cooking (Windows (64-bit)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
PackagingResults: Error: System.ArgumentException: 已添加了具有相同键的项(ERROR: An item with the same key has already been added.)。
UATHelper: Cooking (Windows (64-bit)): BUILD FAILED

删除重复的插件再重新编译即可,回见.

Unity提交AppStore因ASIdentifierManager被拒指南

App Store的应用有4个年龄分级,分别为4+、9+、12+和17+,年龄分级是指该应用(软件、游戏或者媒体内容等)允许面向的用户群的年龄,其中4+为4岁以上,9+为9岁以上,以此类推.
对于4+这个级别,Apple要求比较苛刻,下面这几条只有任何一点满足提交审核都会被拒,

• Does your app include third-party analytics? If so, please provide details about what data is collected for this purpose.
• Does your app include third-party advertising? If so, please provide a link to the ad network’s publicly-documented practices and policies for kids apps.
• Will the data be shared with any third parties? If so, for what purposes and where will this information be stored?
• Is your app collecting any user or device data for purposes beyond third-party analytics or third-party advertising? If so, please provide a complete and clear explanation of all planned uses of this data.

继续阅读

从Unity4.x到Unity2021.x及UnityScript到C#的转换

打开尘封的项目代码,满满的回忆.把它们升级到最新的Unity2021.x吧.因为现在Unity不支持UnityScript即js了.所以要升级旧版本Unity项目,尤其使用JS开发的项目,要转换程序语言,还是要费点周折.

首先码齐一些列版本,每个大版本号均安装一份,因为旧版本在macOS上无法正常运行,所以只能使用在Windows的版本,安装好Unity4.x/Unity5.x/Unity2017.x/Unity2018.x/Unity2020.x/Unity2021.x等.每个大版本安装最新的小版本就可以.但是Unity2018.x要安装2018.1.x(含)之前的版本,因为之后就不再支持UnityScript了.

继续阅读