Hello all.
In our game we have a main menu scene, and a game scene. We switch between them to keep memory usage low. Up until now, everything has worked just fine, but after upgrading to Unity 5 (this project started a long time ago), Unity now refuses to read any of the .assets files in the package (including scene files) after X scene switches. Sometimes we can play 3 games before it happens, sometimes its 7 games. Its never less than 3. We are loading the Game Scene asynchronously, and loading the Main Menu scene synchronously.
This always happens at the Game Scene load, not the Main Menu scene load.
The app then crashes hard. We have code expecting to find other code in the Game Scene, which then causes a shitstorm of nullrefs, because the Game Scene file could not be read.
We are using Unity 5.1.2.p3 - we also tried 5.1.2f1. Same issue. I’m posting the xCode log below.
I’m having a hard time reproducing this bug in a clean project that just switches scenes, and I’m worried that the bug might only show in a project with lots of stuff in there. I probably can’t submit our project to Unity - theres some legal stuff there, that we’re not quite sure of.
EDIT: I should say, that this does not happen in editor or in our Android build.
xCode log below:
Could not open file /private/var/mobile/Containers/Bundle/Application/FB11D8B2-09FB-4B6B-AF5D-4A9FD2E991C0/projecttitan.app/Data/level1 for read
(Filename: /Users/builduser/buildslave/unity/build/Runtime/File/OpenFileCache.cpp Line: 54)
Could not open file /private/var/mobile/Containers/Bundle/Application/FB11D8B2-09FB-4B6B-AF5D-4A9FD2E991C0/
projecttitan.app/Data/level1 for read
(Filename: /Users/builduser/buildslave/unity/build/Runtime/File/OpenFileCache.cpp Line: 54)
Failed to load 'level1' because its serialized file version is higher than what this version of Unity supports.
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Misc/LoadSceneOperation.cpp Line: 83)
Could not open file /private/var/mobile/Containers/Bundle/Application/FB11D8B2-09FB-4B6B-AF5D-4A9FD2E991C0/
projecttitan.app/Data/level1 for read
(Filename: /Users/builduser/buildslave/unity/build/Runtime/File/OpenFileCache.cpp Line: 54)
Could not open file /private/var/mobile/Containers/Bundle/Application/FB11D8B2-09FB-4B6B-AF5D-4A9FD2E991C0/
projecttitan.app/Data/level1 for read
(Filename: /Users/builduser/buildslave/unity/build/Runtime/File/OpenFileCache.cpp Line: 54)
Could not open file /private/var/mobile/Containers/Bundle/Application/FB11D8B2-09FB-4B6B-AF5D-4A9FD2E991C0/
projecttitan.app/Data/sharedassets2.assets for read
(Filename: /Users/builduser/buildslave/unity/build/Runtime/File/OpenFileCache.cpp Line: 54)
Could not open file /private/var/mobile/Containers/Bundle/Application/FB11D8B2-09FB-4B6B-AF5D-4A9FD2E991C0/
projecttitan.app/Data/sharedassets2.assets for read
(Filename: /Users/builduser/buildslave/unity/build/Runtime/File/OpenFileCache.cpp Line: 54)
Could not open file /private/var/mobile/Containers/Bundle/Application/FB11D8B2-09FB-4B6B-AF5D-4A9FD2E991C0/
projecttitan.app/Data/level1 for read
(Filename: /Users/builduser/buildslave/unity/build/Runtime/File/OpenFileCache.cpp Line: 54)
Could not open file /private/var/mobile/Containers/Bundle/Application/FB11D8B2-09FB-4B6B-AF5D-4A9FD2E991C0/
projecttitan.app/Data/level1 for read