簡體   English   中英

在 Unity 上使用 il2cpp 構建不適用於庫 SharpKml

[英]Building with il2cpp on Unity doesn't work with the library SharpKml

當我為 Android 使用 mono 構建時,我的應用程序運行良好。 但是當我使用 il2cpp 構建時,我的應用程序也可以正常工作,但是當我想創建 KML 文件時,我有一個例外:“對象引用未設置為實例或對象”。 當然,因為 root 必須為空。

KmlFile kml = KmlFile.Create(root, false); 
            using (FileStream stream = File.OpenWrite(path))
            {
                kml.Save(stream);
            }

我不明白為什么它適用於單聲道但不適用於 il2cpp。 il2cpp 在二進制應用程序中不包含sharpkml 嗎?

我發現。 我只需添加<assembly fullname="SharpKml.Core" preserve="all"/>而不是<assembly fullname="SharpKml" preserve="all"/>並且應用程序運行良好。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM