# Unity... closes?

**URL:** <https://discussions.unity.com/t/unity-closes/656534>\
**Category:** Scripting\
**Tags:** Scripting\
**Created:** [February 25, 2017, 6:52pm UTC](https://discussions.unity.com/t/unity-closes/656534 "2017-02-25T18:52:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![HarryIsBeast](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/harryisbeast/32/551137_2.png) [@HarryIsBeast](https://discussions.unity.com/u/HarryIsBeast)\
**Post date:** [February 25, 2017, 6:52pm UTC](https://discussions.unity.com/t/unity-closes/656534/1 "2017-02-25T18:52:07Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![takatok](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/takatok/32/586449_2.png) [@takatok](https://discussions.unity.com/u/takatok)\
**Post date:** [February 25, 2017, 6:56pm UTC](https://discussions.unity.com/t/unity-closes/656534/2 "2017-02-25T18:56:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![HarryIsBeast](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/harryisbeast/32/551137_2.png) [@HarryIsBeast](https://discussions.unity.com/u/HarryIsBeast)\
**Post date:** [February 25, 2017, 7:04pm UTC](https://discussions.unity.com/t/unity-closes/656534/3 "2017-02-25T19:04:42Z")

</div>

> [@takatok](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![HarryIsBeast](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/harryisbeast/32/551137_2.png) [@HarryIsBeast](https://discussions.unity.com/u/HarryIsBeast)\
**Post date:** [February 25, 2017, 7:16pm UTC](https://discussions.unity.com/t/unity-closes/656534/4 "2017-02-25T19:16:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Luto\_Akino](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/luto_akino/32/389096_2.png) [@Luto\_Akino](https://discussions.unity.com/u/Luto_Akino)\
**Post date:** [December 5, 2022, 6:12am UTC](https://discussions.unity.com/t/unity-closes/656534/5 "2022-12-05T06:12:42Z")

</div>

> [@HarryIsBeast](#):
>
> 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.

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.
