Unity... closes?

I have literally no idea what is happening. I just opened Unity for the first time today (It was working fine yesterday) and now when I press the play button in the editor Unity just closes, doesn’t ask to save, doesn’t pop up with any message, doesn’t lag, just… closes. Any idea why this is happening and or how to fix it?

Not sure… but remember when God closes a Unity, somewhere he opens an Unreal Engine.

But seriously, it could be anything. First test that its not code that is causing this problem. Load a brand new project. Add a 3D sphere to it. Add RigidBody to it and press play it should start falling down.

If Unity also crashes on this, you might want to backup your code and uninstall Unity and reinstall it. Maybe something with Unity itself got corrupted.

If the sphere test works just fine then its your code. If its not a lot of code, try recreating a new project and just add pieces in one by one till it all works or something breaks. If its a lot of code backtrack to the most recent changes and see if you can figure it out.

1 Like

Okay… so I guess it’s a script messing everything up because the new project worked fine. This is going to be extremely annoying to figure out. It literally closes instantly. I will try and update this if I find the answer to my problem.

For anyone having a similar issue I might have found your fix, at least if you are working with something mobile. It might have to do with your Advertisements, if you have them in. Find your script that uses them and try to get rid of all the code that uses advertisements or put a // in front of it. It should crash one more time but then it should be fixed.

1 Like

thanks, I’m going through hell with the Mediation SDK, it’s giving me a headache right now. In my case, I went back to the base version of the editor I started creating my game with, because I had a lot of errors with Mediation in many versions of Unity, and when I tried to play my game the editor would crash. I followed your steps by uninstalling Ads, Analytics and unlinking my project in services, and now I can play it again just before the Mediation disaster.
I don’t know what to do, I need those ads in my application. I will try a few more times.