Hi,
I published a game in the Microsoft Store for Xbox, I’m using Xbox Series S to test it but the game seems to crash whenever anything is loading really, that includes any heavy calculations done on the main thread, Instantiating players/models, loading scenes, etc…
It used to crash whenever the game starts I’m guessing because I load all the items(177 total) we have in the game (and by load, I mean just fetching each item’s data from the server, assigning a Sprite for each item, and store them in Dictionaries) to correctly display the items in the items menu in the main menu.
I fixed that by just running each step for these calculations on another thread using await Task.Run(() => .....);
But I cannot do that for every reason a crash occurs for, like instantiating because doing anything UnityEngine.Object related must be on the main thread.
I really have no idea what is causing those crashes. The game runs perfectly on my PC and it’s not even that good, it’s just a Ryzen 5 2400G with no external GPU, so the Xbox Series S should be way better, or at least could handle instantiating a model of a gun in the main menu.
It does not give callstacks or at least I can’t find any, I am not able to reproduce it on my PC at all, but it always crashes on my tester’s Xbox Series S.
He’s downloading it directly from the store, I tried to download it directly from the store too but on my Windows PC because I thought something went wrong in the building process somehow, but it still worked perfectly on my end.