为了使用Unity2018的嵌套Prefab,贴图Streaming,GPU烘焙,新地形系统等特性。我们从2017.4升级到了2018.3,虽然更希望升级到更稳定的2018.4版本,但是实在是等不急了。
以前也干过好几次类似的事升级到4.6,升级到5.5,升级到2017等等,每次都会出现很多问题,这次也不例外出现了很多错误。不过相对之前的升级这次的改动算是很小的,也很顺利,这里进行一些记录和备忘。
版本
- Unity2017.4.2f2->Unity2018.3.0f2
插件
更新到最新的版本3.4.8
手动升级,平台选项去掉了PSP2

去掉了TrackMediaType
https://github.com/Unity-Technologies/PostProcessing/releases
去掉N3DS和PSP2
translator.Alias(typeof(Type), "System.MonoType")->translator.Alias(typeof(Type), "System.RuntimeType");

新增两种类型typeof(Camera.GateFitMode), typeof(Camera.GateFitParameters)

WWW->UnityWebRequest

项目设置
- ProjectSettings有较大变化
- ProjectVersion版本号更新
- QualitySetting有更新,增加了StreammingMipmaps等配置
- UnityConnectSetting有较大变化
- VFXManger新增
- PresetManager新增
接口变更
- strippingLevel->ManagedStrippingLevel
//-2018.3buildInfo.CodeStrippingLevel = PlayerSettings.strippingLevel;
buildInfo.CodeStrippingLevel = (StrippingLevel)PlayerSettings.GetManagedStrippingLevel(EditorUserBuildSettings.selectedBuildTargetGroup);


- tangentMode->weightedMode


- FindPrefabRoot->GetOutermostPrefabInstanceRoot

- GetPrefabParent->GetCorrespondingObjectFromSource
- ReplacePrefab->SaveAsPrefabAssetAndConnect/SavePrefabAsset/SaveAsPrefabAsset
- AndroidBuildSystem.Internal->AndroidBuildSystem.Gradle


- PrefabType->PrefabAssetType
//-2018.3PrefabType _type = PrefabUtility.GetPrefabType(seq.gameObject);
PrefabAssetType _type = PrefabUtility.GetPrefabAssetType(seq.gameObject);
