gpt4 book ai didi

c# - Unity - 加载错误时脚本化对象具有不同的序列化布局

转载 作者:行者123 更新时间:2023-11-29 05:54:11 24 4
gpt4 key购买 nike

该游戏之前曾在我的 iPhone 8 Plus 上运行过,到目前为止一直没有任何问题。现在,我在应用程序运行时在 Xcode 中得到以下输出:

2019-03-25 02:16:01.659981+0000 tester[5780:2725434] [DYMTLInitPlatform] platform initialization successful
CrashReporter: initialized
2019-03-25 02:16:01.731073+0000 tester[5780:2725204] Built from '2018.3/staging' branch, Version '2018.3.3f1 (393bae82dbb8)', Build type 'Release', Scripting Backend 'il2cpp'
2019-03-25 02:16:01.734912+0000 tester[5780:2725204] -> registered mono modules 0x101706230
-> applicationDidFinishLaunching()
2019-03-25 02:16:01.876713+0000 tester[5780:2725204] Metal GPU Frame Capture Enabled
2019-03-25 02:16:01.877790+0000 tester[5780:2725204] Metal API Validation Disabled
2019-03-25 02:16:02.125502+0000 tester[5780:2725204] [Warning] Trying to set delaysTouchesBegan to NO on a system gate gesture recognizer - this is unsupported and will have undesired side effects
-> applicationDidBecomeActive()
GfxDevice: creating device client; threaded=1
Initializing Metal device caps: Apple A10 GPU
Initialize engine version: 2018.3.3f1 (393bae82dbb8)
2019-03-25 02:16:02.722439+0000 tester[5780:2725483] [avas] AVAudioSessionPortImpl.mm:56:ValidateRequiredFields: Unknown selected data source for Port Speaker (type: Speaker)
2019-03-25 02:16:02.723162+0000 tester[5780:2725483] [avas] AVAudioSessionPortImpl.mm:56:ValidateRequiredFields: Unknown selected data source for Port Speaker (type: Speaker)
CrashReporter: No pending report exists at /var/mobile/Containers/Data/Application/2F1B8739-D2F2-4116-92CA-BAE215C4DD5D/Library/Caches/CrashReports/crash-pending.plcrashThe referenced script (Network) on this Behaviour is missing!

(Filename: Line: 195)

The referenced script (ClientHandleData) on this Behaviour is missing!

(Filename: Line: 195)

The referenced script (ClientSendData) on this Behaviour is missing!

(Filename: Line: 195)

The referenced script (Player) on this Behaviour is missing!

(Filename: Line: 195)

The referenced script (MenuManager2) on this Behaviour is missing!

(Filename: Line: 195)

The referenced script (GPS) on this Behaviour is missing!

(Filename: Line: 195)

The referenced script on this Behaviour (Game Object 'NetworkManager') is missing!

(Filename: Line: 294)

A scripted object (probably Network?) has a different serialization layout when loading. (Read 32 bytes but expected 60 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

(Filename: Line: 2001)

The referenced script on this Behaviour (Game Object 'NetworkManager') is missing!

(Filename: Line: 294)

A scripted object (probably Player?) has a different serialization layout when loading. (Read 32 bytes but expected 52 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

(Filename: Line: 2001)

The referenced script on this Behaviour (Game Object 'NetworkManager') is missing!

(Filename: Line: 294)

A scripted object (probably ClientSendData?) has a different serialization layout when loading. (Read 32 bytes but expected 44 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

(Filename: Line: 2001)

The referenced script on this Behaviour (Game Object 'NetworkManager') is missing!

(Filename: Line: 294)

The referenced script on this Behaviour (Game Object 'MenuManager') is missing!

(Filename: Line: 294)

A scripted object (probably MenuManager2?) has a different serialization layout when loading. (Read 32 bytes but expected 68 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

(Filename: Line: 2001)

The referenced script on this Behaviour (Game Object 'GPS') is missing!

(Filename: Line: 294)

A scripted object (probably GPS?) has a different serialization layout when loading. (Read 32 bytes but expected 36 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

(Filename: Line: 2001)

UnloadTime: 2.920625 ms
Setting up 1 worker threads for Enlighten.
Thread -> id: 170b7b000 -> priority: 1

我没有在代码中的任何地方使用#ifdef UNITY_EDITOR。游戏在 Unity 编辑器中运行得非常好,没有任何问题或警告。游戏确实会加载到显示主菜单的手机上,但播放按钮不会进入下一个场景。

根据输出,似乎始终只读取每个对象的 32 个字节。

有什么想法吗?

最佳答案

我最近遇到了这个问题。就我而言,我必须将 Windows 游戏转换为支持 Mac。该游戏在编辑器中运行良好,但在独立时则不然。

这是因为我忘记更新 asmdef 中的 includePlatforms 以包含我正在构建的平台,即 macOSStandalone。 (它在编辑器中有效,因为我在“includePlatforms”中指定了“编辑器”)

奇怪的是,我没有找到任何有关其他可能选择的 Unity 文档。我在这里找到了一个很大的列表:Unity Multiple Assembly Definition Files Error

关于c# - Unity - 加载错误时脚本化对象具有不同的序列化布局,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55330617/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com