Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/unity3d/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 改变场景时,unity游戏崩溃似乎是随机的_Android_Unity3d_Crash - Fatal编程技术网

Android 改变场景时,unity游戏崩溃似乎是随机的

Android 改变场景时,unity游戏崩溃似乎是随机的,android,unity3d,crash,Android,Unity3d,Crash,我有两个场景:水平选择场景,游戏场景 在游戏场景中,当用户出现故障时可以重播。我制作了一个UGUI按钮来重新加载当前场景。 按钮代码是SceneManager.LoadScene(1),但有时会崩溃。不是所有的时间,似乎当我很快失败的游戏,并按下重启按钮,3或4倍的游戏崩溃。 它不仅出现在android中,也出现在wp81或unity editor崩溃中 我有一个星期的麻烦。。。谢谢你的帮助 以下是android logcat信息:(是否仍然可以获得更多错误信息?感谢所有链接、关键字和帮助。)

我有两个场景:水平选择场景,游戏场景 在游戏场景中,当用户出现故障时可以重播。我制作了一个UGUI按钮来重新加载当前场景。 按钮代码是SceneManager.LoadScene(1),但有时会崩溃。不是所有的时间,似乎当我很快失败的游戏,并按下重启按钮,3或4倍的游戏崩溃。 它不仅出现在android中,也出现在wp81或unity editor崩溃中

我有一个星期的麻烦。。。谢谢你的帮助

以下是android logcat信息:(是否仍然可以获得更多错误信息?感谢所有链接、关键字和帮助。)

回溯:

lib/arm/libunity.so (UI::CanvasRenderer::SyncDirtyElements()+132)
lib/arm/libunity.so (UI::CanvasManager::UpdateDirtyRenderers(UI::Canvas*)+196)
lib/arm/libunity.so (UI::Canvas::UpdateBatches(bool)+112)
lib/arm/libunity.so (UI::CanvasManager::WillRenderCanvases()+64)
lib/arm/libunity.so (PlayerLoop(bool, bool, IHookEvent*)+3392)
lib/arm/libunity.so (UnityPlayerLoop()+704)
lib/arm/libunity.so (nativeRender(_JNIEnv*, _jobject*)+264)
@base.apk@classes.dex

您只需放置一个helper bool变量,如didstartingnewlevel,以调用SceneManager.LoadScene()仅一次。场景管理器是一个新事物,所以我并不惊讶它有这样的小故障,也许他们会修复它。您可能应该提交一个bug。什么是“UGUI”?如果是第三方模块,请询问他们。您应该使用普通的Unity.UI。我认为他将Unity UI称为UGUI@JoeBlow。请看:您可以只放置一个helper bool变量,如didstartingnewlevel,以调用SceneManager.LoadScene()一次。场景管理器是一个新事物,所以我并不惊讶它有这样的小故障,也许他们会修复它。您可能应该提交一个bug。什么是“UGUI”?如果是第三方模块,请询问他们。你应该使用普通的Unity.UI。我想他把Unity UI称为UGUI@JoeBlow。看到了吗:
lib/arm/libunity.so (UI::CanvasRenderer::SyncDirtyElements()+132)
lib/arm/libunity.so (UI::CanvasManager::UpdateDirtyRenderers(UI::Canvas*)+196)
lib/arm/libunity.so (UI::Canvas::UpdateBatches(bool)+112)
lib/arm/libunity.so (UI::CanvasManager::WillRenderCanvases()+64)
lib/arm/libunity.so (PlayerLoop(bool, bool, IHookEvent*)+3392)
lib/arm/libunity.so (UnityPlayerLoop()+704)
lib/arm/libunity.so (nativeRender(_JNIEnv*, _jobject*)+264)
@base.apk@classes.dex