# Zed activation on load stuck my game unity

**URL:** <https://community.stereolabs.com/t/zed-activation-on-load-stuck-my-game-unity/1424>\
**Category:** C#\
**Tags:** unity\
**Created:** [July 30, 2022, 4:17pm UTC](https://community.stereolabs.com/t/zed-activation-on-load-stuck-my-game-unity/1424 "2022-07-30T16:17:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![darkladen](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/d/2acd7d/32.png) [@darkladen](https://community.stereolabs.com/u/darkladen)\
**Post date:** [July 30, 2022, 4:17pm UTC](https://community.stereolabs.com/t/zed-activation-on-load-stuck-my-game-unity/1424/1 "2022-07-30T16:17:23Z")

</div>

Hello guys, i have developed a interactive game (interactive floor) where I use the Zed 2 and my “problem”(a bit uncomfortable) is the slow recognition(activation) of the Zed 2 hardware. When my game try to use the Zed 2, take a few seconds and in the maintime, the game stay stuck. This is not so uncomfortable if this happens only once when the game loads but my game have two mode games and each time that i go back to game mode 1(where i use the zed 2) the game stuck some seconds.

Is there any way by this task take less time ? Any optimization example for this problem ?

Is it possible to use pyton (if in this way I can optimize my game) to send all possible data from Zed to the game in unity and work with these ?

Thanks.

---

<div class="post-metadata">

**Author:** ![obraun-sl](https://community.stereolabs.com/user_avatar/community.stereolabs.com/obraun-sl/32/17_2.png) [@obraun-sl](https://community.stereolabs.com/u/obraun-sl)\
**Post date:** [August 2, 2022, 4:59pm UTC](https://community.stereolabs.com/t/zed-activation-on-load-stuck-my-game-unity/1424/2 "2022-08-02T16:59:34Z")

</div>

Hi,

Thanks for reaching us out.

Unfortunately , this is the time to setup all the stream and communication with the camera itself and load the resources of the SDK.  
However, that should not block the game as the initialization is made in a co routine as shown here  
[https://github.com/stereolabs/zed-unity/blob/master/ZEDCamera/Assets/ZED/SDK/Helpers/Scripts/ZEDManager.cs#L1899](https://github.com/stereolabs/zed-unity/blob/master/ZEDCamera/Assets/ZED/SDK/Helpers/Scripts/ZEDManager.cs#L1899)

Does your game script runs in the same context as the ZEDManager ?

Regarding sending Data, it depends on what you want to do.  
The SDK can ingest a stream instead of Live USB connection : In this way, you can use python to stream the video to the Unity Plugin. This uses the Streaming module of the ZED SDK. Note that most of the compute is still done on Unity side, but that might help reduce the loading time.  
More information can be found here :  
[https://www.stereolabs.com/docs/video/streaming/](https://www.stereolabs.com/docs/video/streaming/)

Best,  
Olivier

Olivier Braun  
Lead Developer  
Stereolabs Support

---

<div class="post-metadata">

**Author:** ![karalinda](https://community.stereolabs.com/user_avatar/community.stereolabs.com/karalinda/32/2656_2.png) [@karalinda](https://community.stereolabs.com/u/karalinda)\
**Post date:** [March 12, 2024, 10:37am UTC](https://community.stereolabs.com/t/zed-activation-on-load-stuck-my-game-unity/1424/3 "2024-03-12T10:37:11Z")

</div>

When my game try to use the Zed 2, take a few seconds and in the maintime, \*the game stay stuck This is not so uncomfortable if this happens … trying to play any app that uses the ZED in Unity [slope unblocked](https://slope-unblocked.org/) causes Unity to crash. Steps to reproduce: Create a new 3D project in Unity 2017 My game was working just fine, after i added new enemy script, _unity_ just freezes and gets stuck in a _loading_ to play mode.

---

<div class="post-metadata">

**Author:** ![Sofiachloe](https://community.stereolabs.com/user_avatar/community.stereolabs.com/sofiachloe/32/2717_2.png) [@Sofiachloe](https://community.stereolabs.com/u/Sofiachloe)\
**Post date:** [March 27, 2024, 8:11am UTC](https://community.stereolabs.com/t/zed-activation-on-load-stuck-my-game-unity/1424/4 "2024-03-27T08:11:19Z")

</div>

When my game try to use the Zed 2, take a few seconds and in the main time, the game\* stay stuck. This is not so uncomfortable if this happens … trying to play any app that uses the ZED in Unity [2048 cupcakes](https://2048-cupcakes.org/) causes Unity to crash. … The loading screen appears briefly and then the editor closes. We are having an issue with one of our computers claiming in unity that there is “no network connection” This comes up on the login screen.
