- Home /
Access Violation on Application.LoadLevel
I'm having intermittent errors on WP8 using Application.LoadLevel
. Everything seems fine so far on other platforms but WP8 randomly gives the error. I have about 9 levels in my game which make 11 total scenes including a main menu and an options menu. When the player loses a level they get a "Try Again" button and when they win they get a "Next Level" button.
Win/Lose it doesn't matter, and it's not tied to the GUI.Button
as I've also had the same thing happen on the main menu which uses OnMouseUpAsButton
. In the debugger It simply gives the ID of the error and "Access Violation". It doesn't hit a breakpoint or anything, simply closes the application then and there.
Is this a known bug? Is there a workaround?
This happens whether it's a scene by name:
Application.LoadLevel("Level1");
Or if it's by index:
Application.LoadLevel(Application.loadedLevel + 1);
Or even if it's reloading the exact same index:
Application.LoadLevel(Application.loadedLevel);
And, again, it's entirely random. Sometimes it's after the main menu loading the first level. Other times it's after losing a level 3 times in a row. Sometimes you've won a level and you're simply going to the next one.
Your answer
![](https://koobas.hobune.stream/wayback/20220613135700im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Windows Store (WP 8.1) errors while building 0 Answers
Loading scene from WP8 menu 1 Answer
error while building wp8 project 0 Answers
problem decoding xml file to object 0 Answers