客戶端debug

Q: ILRuntime 模式下登入返回出錯

BsonSerializationException: Maximum serialization depth exceeded (does the object being serialized have a circular reference?).

A: 解答在第二章圖,因為那邊調用了 MongoHelper.toJson 在 Editor 看不到全部的 Callstack,需要去 Editor.log 查看全部的調用紀錄。

Q:客戶端 export client design 出現錯誤

A: 刪除掉 {Project}\Excel\md5.txt 重新導出

Q: 在 EditWindow 使用 Sprite 發現不存在

A: 需要引用 UnityEditor.U2D.Sprites 如下

using UnityEditor.U2D.Sprites;

[ref] https://docs.unity3d.com/2021.2/Documentation/Manual/UpgradeGuide2019LTS.html

Q:打包版本出現錯誤

Library\PackageCache\[email protected]\Runtime\UI\Core\Image.cs(887,87): error CS1061: 'Sprite' does not contain a definition for 'isUsingPlaceholder' and no accessible extension method 'isUsingPlaceholder' accepting a first argument of type 'Sprite' could be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\[email protected]\Runtime\UI\Core\Image.cs(1865,38): error CS1061: 'SpriteAtlas' does not contain a definition for 'IsPlaceholder' and no accessible extension method 'IsPlaceholder' accepting a first argument of type 'SpriteAtlas' could be found (are you missing a using directive or an assembly reference?)

A:PlayerSetting 選擇 IL2CPP 會出現這個問題

Q.PC包下載資源出現問題

unity Non-secure network connections disabled in Player Settings

A: 需要將 Player Setting, Allow downloads over HTTP 改成 always allow

Q.使用Arial.ttf在Unity2022版本出錯

argumentexception: arial.ttf is no longer a valid built in font. please use legacyruntime.ttf

A.需要改用legacyruntime.ttf

Q.打包apk出現問題

Cause: unable to find valid certification path to requested target

有提到是關於網絡不穩定造成的

後來是在 build.gradle 添加了這行才解決的

checkReleaseBuilds false

Q.安裝到Pixel6的轟炸超人並沒有出現在桌面也搜不到

一定要保證安裝到最後有出現Success

查了安裝的日誌發現不少關於網絡的Error, 開了 proxy 後終於安裝成功且出現 Success(之前都會卡在最後面不動)

Last updated