Introduction:
On Monday, I got my game called Nightly Escape on the Microsoft Marketplace; however, there was a problem when trying to start it up on XBOX.
The Problem:
On Windows, it runs smoothly with no problems. But, with XBOX, when I click play, it shows the icon of the game and quits instantly. The game on the Microsoft store costs money so I need this fixed ASAP. It’s not much though. Been trying to fix it for a week and nothing is helping. I tried debugging it on Visual Studio with my Xbox in Developer Mode and some logs outputs. It seems to be a memory issue. Not too sure. I included a txt file with the log.
I got an Xbox Series X and my friend tried it on his Xbox which is an Xbox Series S with the same results. He was extremely excited to play it as well. Luckily he didn’t pay for it as I gave him a product code.
I tried everything, even using ChatGPT to help with finding out the errors. Unfortunately, errors seem to be caused by Unity itself and none of my code.
In-Depth:
On a normal XBOX, it closes the game almost instantly after it shows the game icon. No “Made with Unity” splash screen.
So I installed the Xbox Dev Kit and switched my Xbox to dev mode. Went to the web page and uploaded the MSI to my Xbox and ran it. This time it shows the “Made with Unity” splash screen and just freezes afterward.
Then from the built solution that was built in Unity, I ran it through to my Xbox with the Remote Machine option and it successfully made it to the Main Menu screen of my game. Before I continue, I am going to share my code to help show more information.
private void Update()
{
if (Gamepad.current != null)
{
play.text = "Play (A)";
quit.text = "Quit (B)";
if (Input.GetKeyDown(KeyCode.JoystickButton0))
{
// Play Game
playGame();
} else if (Input.GetKeyDown(KeyCode.JoystickButton1))
{
// Quit Game
quitGame();
}
}
}
This is the update method in the main menu script. It runs the “if (Gamepad.current != null)” successfully as the text changed from “Play” to “Play (A)”, same with the quit text. However, when trying to press A, it doesn’t do anything on the game. In Visual Studio however, it gives a couple of popups with these messages “A breakpoint instruction (__debugbreak() statement or a similar call) was executed in Nightly Escape.exe.” then when I click continue a few times, this message pop-ups “Unhandled exception at 0x00007FFECC91478D (UnityPlayer.dll) in Nightly Escape.exe: 0xC0000005: Access violation reading location 0x0000000000000000.” and I am unable to continue after that.
Conclusion:
So, I am hoping someone on here can help as I ain’t sure what it could be. This is outside my knowledge of this since this seems to have something to do with Unity itself. Not too sure. I am hoping someone could help ASAP so I can finally put a working version on the store. I am currently trying to contact ID@XBOX is they can somehow assist as well.
9880308–1425243–error.txt (520 KB)