xcode Unity 应用程序在第一个场景中崩溃
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12697103/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unity app crash on first scene
提问by Ayaz Alavi
I am receiving following log on unity app launch on Xcode.
我收到以下登录统一应用程序在 Xcode 上启动。
2012-10-03 00:28:58.721 salah[1357:707] -> registered mono modules 0xe5d53c
-> applicationDidFinishLaunching()
Mono path[0] = '/var/mobile/Applications/6466AD40-4714-4F2A-A20F-5B6803CDC1ED/salah.app/Data/Managed'
Invalid serialized file version. File: "/var/mobile/Applications/6466AD40-4714-4F2A-A20F-5B6803CDC1ED/salah.app/Data/mainData". Expected version: 3.5.5f2. Actual version: 3.5.5f3.
(Filename: /Applications/buildAgent/work/14194e8ce88cdf47/Runtime/Serialize/SerializedFile.cpp Line: 709)
Failed to read file '/var/mobile/Applications/6466AD40-4714-4F2A-A20F-5B6803CDC1ED/salah.app/Data/mainData' because it is corrupted.
(Filename: /Applications/buildAgent/work/14194e8ce88cdf47/Runtime/Serialize/SerializedFile.cpp Line: 430)
PlayerInitEngineNoGraphics settings: Could not preload global game manager #0
engine intialization failed
This causes my unity 3d app to crash before first scene comes forward.
这会导致我的 Unity 3d 应用程序在第一个场景出现之前崩溃。
Anybody knows workaround?
有人知道解决方法吗?
App have been switch alot with different versions of unity.
应用程序已经切换了很多不同版本的统一。
回答by Ali
"No GlobalGameManagers file was found, quitting player!" happens, at least sometimes, because some random problem prevents the editor from going all the way to the end of the build.
Usually, you should be able to see an error in console that is not a compile error and could be easily missed if you clean the console.
“没有找到 GlobalGameManagers 文件,退出玩家!” 至少有时会发生,因为一些随机问题会阻止编辑器一直运行到构建结束。
通常,您应该能够在控制台中看到一个不是编译错误的错误,如果您清理控制台,很容易错过。
In my case it was a windows dll "NSpec.dll" that I needed for my tests, but by mistake was not under an Editorpath (and wasnot excluded from build, by the checkmark in the inspector) so during the build, Unity wanted to include it in my iOS build but then complained and stopped midway, while the half done project looked OK.
在我的例子中,我的测试需要一个 windows dll“NSpec.dll”,但错误地不在Editor路径下(并且没有被排除在构建之外,通过检查器中的复选标记)所以在构建过程中,Unity想要将它包含在我的 iOS 版本中,但随后抱怨并中途停止,而完成一半的项目看起来还不错。
回答by Starbax
In my case, this error happens (in VisualStudio) because I built the solution in Unity and debugged the same solution in VisualStudio at the same time, so the Unity build didn't run completely.
就我而言,发生此错误(在 VisualStudio 中)是因为我在 Unity 中构建了解决方案并同时在 VisualStudio 中调试了相同的解决方案,因此 Unity 构建没有完全运行。
回答by kashif WattOo
You Should try to delete library and temp folder from the required folder which you have to build it from unity before opening at Xcode.
您应该尝试从所需的文件夹中删除 library 和 temp 文件夹,您必须在 Xcode 打开之前从统一构建它。
回答by Hamdullah shah
Because of switching project from different unity versions that's occur. There is a folder in the Xcode project (open in finder) named "Data" you are using the latest one(f3) means unity replaced that Data folder with the latest unity version while app is expecting the old one "f2". So if you can copy and replace the "Data" folder from old project then this will solve the problem.
由于从不同的统一版本切换项目发生。Xcode 项目(在 finder 中打开)中有一个名为“Data”的文件夹,您使用的是最新版本(f3),这意味着 unity 用最新的 unity 版本替换了该 Data 文件夹,而应用程序期待旧版本的“f2”。因此,如果您可以从旧项目中复制并替换“Data”文件夹,那么这将解决问题。
or updating the unity will also solve the problem.
或者更新unity也会解决问题。
回答by Dhammini F.
Any further solutions? replace the "Data" folder did not work for me..
任何进一步的解决方案?替换“数据”文件夹对我不起作用..


