加载其他场景时,内置的Unity游戏崩溃

时间:2018-10-11 14:33:20

标签: unity3d

在游戏过程中,玩家完成关卡后会出现一个菜单。但是,只要我单击应该将玩家带到另一个场景的按钮,游戏就会立即崩溃。是的,场景已加载到构建设置中。

这是我尝试过的一些事情:

  • 调整了各种构建设置
  • 不是标准Unity资产的预加载资产
  • 已将加载更改为异步
  • 一对一地关闭脚本

这是生成的崩溃日志

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug.bindings.h Line: 43)

Unloading 3 Unused Serialized files (Serialized files now loaded: 0)
Crash!!!
SymInit: Symbol-SearchPath: '.;C:\Users\cth25\Desktop\PN;C:\Users\cth25\Desktop\PN;C:\WINDOWS;C:\WINDOWS\system32;SRV*C:\websymbols*http://msdl.microsoft.com/download/symbols;', symOptions: 534, UserName: 'cth25'
OS-Version: 10.0.0
C:\Users\cth25\Desktop\PN\Project.exe:Project.exe (00007FF75FFA0000), size: 671744 (result: 0), SymType: 'PDB', PDB: '.\WindowsPlayer_x64_Master_mono.pdb', fileVersion: 2018.2.5.29137
C:\WINDOWS\SYSTEM32\ntdll.dll:ntdll.dll (00007FFBF6F20000), size: 1970176 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\ntdll.dll', fileVersion: 10.0.17134.254
C:\WINDOWS\System32\KERNEL32.DLL:KERNEL32.DLL (00007FFBF46A0000), size: 729088 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\KERNEL32.DLL', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\KERNELBASE.dll:KERNELBASE.dll (00007FFBF40D0000), size: 2568192 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\KERNELBASE.dll', fileVersion: 10.0.17134.165
C:\Users\cth25\Desktop\PN\UnityPlayer.dll:UnityPlayer.dll (00007FFB9A4F0000), size: 23748608 (result: 0), SymType: 'PDB', PDB: '.\UnityPlayer_Win32_x64_mono.pdb', fileVersion: 2018.2.5.29137
C:\WINDOWS\System32\CRYPT32.dll:CRYPT32.dll (00007FFBF3AF0000), size: 1974272 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\CRYPT32.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\ucrtbase.dll:ucrtbase.dll (00007FFBF3D00000), size: 1024000 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\ucrtbase.dll', fileVersion: 10.0.17134.254
C:\WINDOWS\SYSTEM32\WindowsCodecs.dll:WindowsCodecs.dll (00007FFBED5B0000), size: 1761280 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\WindowsCodecs.dll', fileVersion: 10.0.17134.285
C:\WINDOWS\SYSTEM32\HID.DLL:HID.DLL (00007FFBF1F60000), size: 49152 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\HID.DLL', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\MSASN1.dll:MSASN1.dll (00007FFBF32B0000), size: 73728 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\MSASN1.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\msvcrt.dll:msvcrt.dll (00007FFBF4880000), size: 647168 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\msvcrt.dll', fileVersion: 7.0.17134.1
C:\WINDOWS\System32\USER32.dll:USER32.dll (00007FFBF4E90000), size: 1638400 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\USER32.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\RPCRT4.dll:RPCRT4.dll (00007FFBF6D90000), size: 1196032 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\RPCRT4.dll', fileVersion: 10.0.17134.112
C:\WINDOWS\System32\win32u.dll:win32u.dll (00007FFBF3CE0000), size: 131072 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\win32u.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\combase.dll:combase.dll (00007FFBF4B50000), size: 3289088 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\combase.dll', fileVersion: 10.0.17134.112
C:\WINDOWS\System32\GDI32.dll:GDI32.dll (00007FFBF4670000), size: 163840 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\GDI32.dll', fileVersion: 10.0.17134.285
C:\WINDOWS\System32\gdi32full.dll:gdi32full.dll (00007FFBF3E00000), size: 1646592 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\gdi32full.dll', fileVersion: 10.0.17134.285
C:\WINDOWS\System32\bcryptPrimitives.dll:bcryptPrimitives.dll (00007FFBF3FA0000), size: 499712 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\bcryptPrimitives.dll', fileVersion: 10.0.17134.285
C:\WINDOWS\System32\msvcp_win.dll:msvcp_win.dll (00007FFBF32F0000), size: 651264 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\msvcp_win.dll', fileVersion: 10.0.17134.137
C:\WINDOWS\System32\ole32.dll:ole32.dll (00007FFBF6C00000), size: 1380352 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\ole32.dll', fileVersion: 10.0.17134.137
C:\WINDOWS\System32\sechost.dll:sechost.dll (00007FFBF4610000), size: 372736 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\sechost.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\SHLWAPI.dll:SHLWAPI.dll (00007FFBF5480000), size: 331776 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\SHLWAPI.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\SYSTEM32\VERSION.dll:VERSION.dll (00007FFBF1D30000), size: 40960 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\VERSION.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\SETUPAPI.dll:SETUPAPI.dll (00007FFBF5020000), size: 4501504 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\SETUPAPI.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\cfgmgr32.dll:cfgmgr32.dll (00007FFBF3390000), size: 299008 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\cfgmgr32.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\ADVAPI32.dll:ADVAPI32.dll (00007FFBF4AA0000), size: 659456 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\ADVAPI32.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\SHELL32.dll:SHELL32.dll (00007FFBF57C0000), size: 21233664 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\SHELL32.dll', fileVersion: 10.0.17134.228
C:\WINDOWS\System32\shcore.dll:shcore.dll (00007FFBF47D0000), size: 692224 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\shcore.dll', fileVersion: 10.0.17134.112
C:\WINDOWS\System32\windows.storage.dll:windows.storage.dll (00007FFBF33E0000), size: 7393280 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\windows.storage.dll', fileVersion: 10.0.17134.285
C:\WINDOWS\System32\kernel.appcore.dll:kernel.appcore.dll (00007FFBF32D0000), size: 69632 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\kernel.appcore.dll', fileVersion: 10.0.17134.112
C:\WINDOWS\System32\profapi.dll:profapi.dll (00007FFBF3280000), size: 126976 (result: 0), SymType: '-nosymbols-', PDB: 'C:\WINDOWS\System32\profapi.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\powrprof.dll:powrprof.dll (00007FFBF3230000), size: 311296 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\powrprof.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\FLTLIB.DLL:FLTLIB.DLL (00007FFBF32A0000), size: 40960 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\FLTLIB.DLL', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\WS2_32.dll:WS2_32.dll (00007FFBF4760000), size: 442368 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\WS2_32.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\OLEAUT32.dll:OLEAUT32.dll (00007FFBF5600000), size: 794624 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\OLEAUT32.dll', fileVersion: 10.0.17134.48
C:\WINDOWS\System32\IMM32.dll:IMM32.dll (00007FFBF6D60000), size: 184320 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\IMM32.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\SYSTEM32\OPENGL32.dll:OPENGL32.dll (00007FFBBC580000), size: 1179648 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\OPENGL32.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\SYSTEM32\WINMM.dll:WINMM.dll (00007FFBF1030000), size: 143360 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\WINMM.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\SYSTEM32\WINHTTP.dll:WINHTTP.dll (00007FFBEE1F0000), size: 901120 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\WINHTTP.dll', fileVersion: 10.0.17134.137
C:\WINDOWS\SYSTEM32\GLU32.dll:GLU32.dll (00007FFBE1A70000), size: 180224 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\GLU32.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\SYSTEM32\WINMMBASE.dll:WINMMBASE.dll (00007FFBF1000000), size: 172032 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\WINMMBASE.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\system32\uxtheme.dll:uxtheme.dll (00007FFBF1330000), size: 622592 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\uxtheme.dll', fileVersion: 10.0.17134.1
C:\Users\cth25\Desktop\PN\MonoBleedingEdge\EmbedRuntime\mono-2.0-bdwgc.dll:mono-2.0-bdwgc.dll (00007FFBAA820000), size: 5996544 (result: 0), SymType: '-exported-', PDB: 'C:\Users\cth25\Desktop\PN\MonoBleedingEdge\EmbedRuntime\mono-2.0-bdwgc.dll'
C:\WINDOWS\System32\PSAPI.DLL:PSAPI.DLL (00007FFBF4E80000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\PSAPI.DLL', fileVersion: 10.0.17134.1
C:\WINDOWS\SYSTEM32\MSWSOCK.dll:MSWSOCK.dll (00007FFBF2A50000), size: 417792 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\MSWSOCK.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\SYSTEM32\CRYPTBASE.DLL:CRYPTBASE.DLL (00007FFBF2C20000), size: 45056 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\CRYPTBASE.DLL', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\MSCTF.dll:MSCTF.dll (00007FFBF4920000), size: 1527808 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\MSCTF.dll', fileVersion: 10.0.17134.285
C:\WINDOWS\system32\dwmapi.dll:dwmapi.dll (00007FFBF1590000), size: 167936 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\dwmapi.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\SYSTEM32\d3d11.dll:d3d11.dll (00007FFBEFB80000), size: 3190784 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\d3d11.dll', fileVersion: 10.0.17134.112
C:\WINDOWS\SYSTEM32\dxgi.dll:dxgi.dll (00007FFBF20C0000), size: 765952 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\dxgi.dll', fileVersion: 10.0.17134.112
C:\WINDOWS\System32\DriverStore\FileRepository\nv_ref_pubwu.inf_amd64_708ec8f9a4d134c6\nvldumdx.dll:nvldumdx.dll (00007FFBEB710000), size: 962560 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\DriverStore\FileRepository\nv_ref_pubwu.inf_amd64_708ec8f9a4d134c6\nvldumdx.dll', fileVersion: 23.21.13.9135
C:\WINDOWS\System32\WINTRUST.DLL:WINTRUST.DLL (00007FFBF4350000), size: 356352 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\WINTRUST.DLL', fileVersion: 10.0.17134.81
C:\WINDOWS\System32\imagehlp.dll:imagehlp.dll (00007FFBF6EC0000), size: 118784 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\imagehlp.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\SYSTEM32\CRYPTSP.dll:CRYPTSP.dll (00007FFBF2C00000), size: 94208 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\CRYPTSP.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\system32\rsaenh.dll:rsaenh.dll (00007FFBF2630000), size: 208896 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\rsaenh.dll', fileVersion: 10.0.17134.254
C:\WINDOWS\SYSTEM32\bcrypt.dll:bcrypt.dll (00007FFBF2D30000), size: 151552 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\bcrypt.dll', fileVersion: 10.0.17134.112
C:\WINDOWS\System32\DriverStore\FileRepository\nv_ref_pubwu.inf_amd64_708ec8f9a4d134c6\nvwgf2umx.dll:nvwgf2umx.dll (00007FFBC09D0000), size: 29392896 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\DriverStore\FileRepository\nv_ref_pubwu.inf_amd64_708ec8f9a4d134c6\nvwgf2umx.dll', fileVersion: 23.21.13.9135
C:\WINDOWS\system32\nvspcap64.dll:nvspcap64.dll (00007FFBC9C70000), size: 2531328 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\nvspcap64.dll', fileVersion: 3.14.0.139
C:\WINDOWS\SYSTEM32\ntmarta.dll:ntmarta.dll (00007FFBF22C0000), size: 200704 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\ntmarta.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\clbcatq.dll:clbcatq.dll (00007FFBF54E0000), size: 655360 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\clbcatq.dll', fileVersion: 2001.12.10941.16384
C:\WINDOWS\system32\wbem\wbemprox.dll:wbemprox.dll (00007FFBED4F0000), size: 69632 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\wbem\wbemprox.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\SYSTEM32\wbemcomn.dll:wbemcomn.dll (00007FFBEDEF0000), size: 536576 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\wbemcomn.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\system32\wbem\wbemsvc.dll:wbemsvc.dll (00007FFBEB850000), size: 81920 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\wbem\wbemsvc.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\system32\wbem\fastprox.dll:fastprox.dll (00007FFBEC050000), size: 991232 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\wbem\fastprox.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\MMDevApi.dll:MMDevApi.dll (00007FFBEE6E0000), size: 483328 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\MMDevApi.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\PROPSYS.dll:PROPSYS.dll (00007FFBF1A30000), size: 1785856 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\PROPSYS.dll', fileVersion: 7.0.17134.112
C:\WINDOWS\System32\DEVOBJ.dll:DEVOBJ.dll (00007FFBF2D60000), size: 159744 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\DEVOBJ.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\SYSTEM32\AUDIOSES.DLL:AUDIOSES.DLL (00007FFBE27C0000), size: 1228800 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\AUDIOSES.DLL', fileVersion: 10.0.17134.137
C:\WINDOWS\SYSTEM32\wintypes.dll:wintypes.dll (00007FFBECE50000), size: 1363968 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\wintypes.dll', fileVersion: 10.0.17134.112
C:\WINDOWS\SYSTEM32\AVRT.dll:AVRT.dll (00007FFBECDC0000), size: 40960 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\AVRT.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.17134.285_none_fb4297e330656775\comctl32.dll:comctl32.dll (00007FFBE30B0000), size: 2527232 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.17134.285_none_fb4297e330656775\comctl32.dll', fileVersion: 6.10.17134.285
C:\WINDOWS\SYSTEM32\TextInputFramework.dll:TextInputFramework.dll (00007FFBEB4D0000), size: 618496 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\TextInputFramework.dll', fileVersion: 10.0.17134.191
C:\WINDOWS\SYSTEM32\CoreUIComponents.dll:CoreUIComponents.dll (00007FFBEC150000), size: 3268608 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\CoreUIComponents.dll', fileVersion: 10.0.17134.112
C:\WINDOWS\SYSTEM32\CoreMessaging.dll:CoreMessaging.dll (00007FFBF08F0000), size: 892928 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\CoreMessaging.dll', fileVersion: 10.0.17134.285
C:\WINDOWS\SYSTEM32\xinput9_1_0.dll:xinput9_1_0.dll (00007FFBF0090000), size: 28672 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\xinput9_1_0.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL:IPHLPAPI.DLL (00007FFBF27D0000), size: 229376 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\NSI.dll:NSI.dll (00007FFBF5470000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\NSI.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL:dhcpcsvc6.DLL (00007FFBEEC70000), size: 90112 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL', fileVersion: 10.0.17134.1
C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL:dhcpcsvc.DLL (00007FFBEE840000), size: 106496 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL', fileVersion: 10.0.17134.1
C:\WINDOWS\SYSTEM32\DNSAPI.dll:DNSAPI.dll (00007FFBF2810000), size: 778240 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\DNSAPI.dll', fileVersion: 10.0.17134.165
C:\Windows\System32\rasadhlp.dll:rasadhlp.dll (00007FFBED950000), size: 40960 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\rasadhlp.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\SYSTEM32\dbghelp.dll:dbghelp.dll (00007FFBE3320000), size: 1871872 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\dbghelp.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\SYSTEM32\SspiCli.dll:SspiCli.dll (00007FFBF3160000), size: 196608 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\SspiCli.dll', fileVersion: 10.0.17134.1
C:\WINDOWS\System32\fwpuclnt.dll:fwpuclnt.dll (00007FFBEFFC0000), size: 466944 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.17134.1

========== OUTPUTTING STACK TRACE ==================

0x00007FFB9A7D5363 (UnityPlayer) GameObject::ActivateAwakeRecursivelyInternal
0x00007FFB9A7D50FB (UnityPlayer) GameObject::ActivateAwakeRecursively
0x00007FFB9A7D5FA9 (UnityPlayer) GameObject::Deactivate
0x00007FFB9A9BD309 (UnityPlayer) DestroyObjectHighLevel
0x00007FFB9A9DE6C8 (UnityPlayer) UnloadGameScene
0x00007FFB9A9E5DA3 (UnityPlayer) LoadSceneOperation::PlayerLoadSceneFromThread
0x00007FFB9A9E4B8B (UnityPlayer) LoadSceneOperation::IntegrateMainThread
0x00007FFB9A9E6D93 (UnityPlayer) PreloadManager::UpdatePreloadingSingleStep
0x00007FFB9A9E7238 (UnityPlayer) PreloadManager::WaitForAllAsyncOperationsToComplete
0x00007FFB9A9E6B16 (UnityPlayer) PreloadManager::UpdatePreloading
0x00007FFB9A9CA4C7 (UnityPlayer) ExecutePlayerLoop
0x00007FFB9A9CA552 (UnityPlayer) ExecutePlayerLoop
0x00007FFB9A9CC41F (UnityPlayer) PlayerLoop
0x00007FFB9B085B35 (UnityPlayer) PerformMainLoop
0x00007FFB9B084C7A (UnityPlayer) MainMessageLoop
0x00007FFB9B08742B (UnityPlayer) UnityMainImpl
0x00007FFB9B0875FB (UnityPlayer) UnityMain
0x00007FF75FFA1207 (Project) __scrt_common_main_seh
0x00007FFBF46B3034 (KERNEL32) BaseThreadInitThunk
0x00007FFBF6F91461 (ntdll) RtlUserThreadStart

========== END OF STACKTRACE ===========

场景更改代码:

public void BackToMain()
    {
        StartCoroutine(callBack());

    }
IEnumerator callBack()
    {
        AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(0);



        while (!asyncLoad.isDone)
        {
            yield return null;
        }

        yield return new WaitForEndOfFrame();
    }

1 个答案:

答案 0 :(得分:0)

IEnumerator callBack()
    {
        AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(0);      

        while (!asyncLoad.isDone)
        {
            yield return null;
        }    
        yield return new WaitForEndOfFrame();
    }

上面的协程似乎永远不会完成并进入无穷大状态(这将导致Unity崩溃)-仅当场景激活设置为true时,isDone才完成。

要解决此问题,您可以添加asyncLoad.allowSceneActivation = true,并且加载完成后将自动启用场景。

否则,如果您希望在启用场景之前先等待,则可以执行以下操作:

 private IEnumerator callBack() {

     AsyncOperation asyncLoad = Application.LoadLevelAsync(0);
     asyncLoad.allowSceneActivation = false;

     while (asyncLoad.progress < 0.9f) {
         yield return null;
     }

     while(!allowLoading) {
         yield return null;
     }

     asyncLoad.allowSceneActivation = true;
 }  

然后您可以在方便时将allowLoading设置为true。

有关此主题的完整主题:https://answers.unity.com/questions/934354/loadlevelasync-stops-at-90.html