# Unity froze after unplay while it was connected to ZI

**URL:** <https://forum.magicleap.cloud/t/unity-froze-after-unplay-while-it-was-connected-to-zi/582>\
**Category:** Unity Development\
**Created:** [August 16, 2022, 5:58pm UTC](https://forum.magicleap.cloud/t/unity-froze-after-unplay-while-it-was-connected-to-zi/582 "2022-08-16T17:58:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wellplayed](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/wellplayed/32/51_2.png) [@wellplayed](https://forum.magicleap.cloud/u/wellplayed)\
**Post date:** [August 16, 2022, 5:58pm UTC](https://forum.magicleap.cloud/t/unity-froze-after-unplay-while-it-was-connected-to-zi/582/1 "2022-08-16T17:58:27Z")

</div>

Give us as much detail as possible regarding the issue you're experiencing.

I was testing with ZI and when I clicked the play button in unity, unity froze but the lab/ZI didn't.

I have attached TheLabLogs.

[TheLabLogs-20220816-102051-win.zip](https://forum.magicleap.cloud/uploads/short-url/25Pub28JuWePhPIwyxlLuenkutt.zip) (1.2 MB)

**Unity Editor version** : 2022.2.0b4  
**ML2 OS version** : B3E.220721.07-R.026\_user  
**MLSDK version** : 0.53.2

**Error messages from logs** (syntax-highlighting is supported via Markdown):

---

<div class="post-metadata">

**Author:** ![kvlasova](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kvlasova](https://forum.magicleap.cloud/u/kvlasova)\
**Post date:** [August 16, 2022, 7:04pm UTC](https://forum.magicleap.cloud/t/unity-froze-after-unplay-while-it-was-connected-to-zi/582/2 "2022-08-16T19:04:44Z")

</div>

Hi @wellplayed ,

Can you confirm that you have the [Zero Iteration Runtime package](https://developer.magicleap.cloud/learn/docs/guides/developer-tools/zero-iteration/zi-setup#installing-zero-iteration) installed as well the the ZI settings checked in the [XR Plugin Management](https://developer.magicleap.cloud/learn/docs/guides/unity/getting-started/configure-unity-settings#xr-plugin-management) settings?

---

<div class="post-metadata">

**Author:** ![TheMunk](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@TheMunk](https://forum.magicleap.cloud/u/TheMunk)\
**Post date:** [August 17, 2022, 7:59am UTC](https://forum.magicleap.cloud/t/unity-froze-after-unplay-while-it-was-connected-to-zi/582/3 "2022-08-17T07:59:46Z")

</div>

Seeing the same behaviour here - using same environment. Had to force close Unity.

Zero iteration is installed through the lab and as a package in Unity (and ZI is set as the platform under desktop/windows in "XR Plug-in Management"). The lab however is not running, and ZI is launched through the unity window.

The whole playthrough works fine (although latency is high) but as soon as you try to get out of playmode, Unity freezes.

Here's the editor log - looks like a memory leak?

> **[Current Block Size 128.0 MB Peak Allocated Bytes 87.1 MB Ove -...](https://pastebin.com/xFgYswxc)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

---

<div class="post-metadata">

**Author:** ![wellplayed](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/wellplayed/32/51_2.png) [@wellplayed](https://forum.magicleap.cloud/u/wellplayed)\
**Post date:** [August 17, 2022, 4:23pm UTC](https://forum.magicleap.cloud/t/unity-froze-after-unplay-while-it-was-connected-to-zi/582/4 "2022-08-17T16:23:30Z")

</div>

Yes it is all set up correctly and works most of the time. It just froze while I was in a meeting with some of the magic leap team and they asked me to share the logs.

---

<div class="post-metadata">

**Author:** ![sengelman](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/sengelman/32/11_2.png) [@sengelman](https://forum.magicleap.cloud/u/sengelman)\
**Post date:** [September 13, 2022, 11:22pm UTC](https://forum.magicleap.cloud/t/unity-froze-after-unplay-while-it-was-connected-to-zi/582/5 "2022-09-13T23:22:51Z")

</div>

As @TheMunk is already aware, we're asking for you (@wellplayed) to try this with the new SDK:

> [@September Software Release](https://forum.magicleap.cloud/t/september-software-release/849/2):
>
> Please do not ignore our message regarding [The Lab 2.0 Deprecation/Magic Leap Hub Installation](https://forum.magicleap.cloud/t/the-lab-2-0-deprecation-magic-leap-hub-installation/848).

---

<div class="post-metadata">

**Author:** ![kdowney](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kdowney/32/481_2.png) [@kdowney](https://forum.magicleap.cloud/u/kdowney)\
**Post date:** [October 24, 2022, 5:26pm UTC](https://forum.magicleap.cloud/t/unity-froze-after-unplay-while-it-was-connected-to-zi/582/6 "2022-10-24T17:26:01Z")

</div>

Closing due to inactivity. Thanks for stopping by the Magic Leap 2 Forum.
