Reputation: 327
My scene loads fine in the Editor maybe 50% of the time. The other half the time Unity stops responding and I have to kill the application. This is also the case when I cause the scene to reload while the Editor is already in play mode. The log doesn't give any useful information as far I can tell, but I've posted it below. What else can I do to see why my scene is crashing?
Reloading assemblies for play mode.
Begin MonoManager ReloadAssembly
Initializing Unity.PackageManager (PackageManager) v2018.3.9 for Unity v2018.3.9f1
Registering platform support modules:
Registered platform support modules in: 0.0554295s.
Native extension for Android target not found
Native extension for iOS target not found
Native extension for OSXStandalone target not found
Refreshing native plugins compatible for Editor in 1.64 ms, found 2 plugins.
Preloading 1 native plugins for Editor in 1.15 ms.
Mono: successfully reloaded assembly
- Completed reload, in 1.489 seconds
Platform modules already initialized, skipping
Load scene 'Temp/__Backupscenes/0.backup' time: 0.616473 ms
Upvotes: 0
Views: 891
Reputation: 327
I figured out what call was breaking the Editor by running the game repeatedly until the freeze occurred, then using Visual Studio (MonoDevelop would also work) and going to Run -> Attach to Process, and then pausing to identify the last call made. In my case it was a while loop which could sometimes cause an overflow with unlucky randomization.
Upvotes: 0