# GUI Control zIndex Update Unlinks Mesh

**URL:** <https://forum.babylonjs.com/t/gui-control-zindex-update-unlinks-mesh/32113>\
**Category:** Bugs\
**Tags:** gui\
**Created:** [July 12, 2022, 7:16pm UTC](https://forum.babylonjs.com/t/gui-control-zindex-update-unlinks-mesh/32113 "2022-07-12T19:16:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![LostVertex](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@LostVertex](https://forum.babylonjs.com/u/LostVertex)\
**Post date:** [July 12, 2022, 7:16pm UTC](https://forum.babylonjs.com/t/gui-control-zindex-update-unlinks-mesh/32113/1 "2022-07-12T19:16:42Z")

</div>

Repro:

> **[Babylon.js Playground](https://playground.babylonjs.com/#XCPP9Y%2314268)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

- load playground
- wait for one second
- the linked label will turn red and no longer maintain its linkage to the sphere

You can click the label to re-link it.

This unlink happens when the `zIndex` is updated (see the `unlink` function).

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [July 12, 2022, 9:21pm UTC](https://forum.babylonjs.com/t/gui-control-zindex-update-unlinks-mesh/32113/2 "2022-07-12T21:21:10Z")

</div>

cc @carolhmj

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [July 12, 2022, 9:36pm UTC](https://forum.babylonjs.com/t/gui-control-zindex-update-unlinks-mesh/32113/3 "2022-07-12T21:36:38Z")

</div>

Assigned @carolhmj on July 12, 2022, 9:36pm UTC



---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [July 13, 2022, 1:15pm UTC](https://forum.babylonjs.com/t/gui-control-zindex-update-unlinks-mesh/32113/4 "2022-07-13T13:15:58Z")

</div>

PR up! [If controls are reordered, relink them to mesh by carolhmj · Pull Request #12743 · BabylonJS/Babylon.js (github.com)](https://github.com/BabylonJS/Babylon.js/pull/12743)

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [July 15, 2022, 12:36pm UTC](https://forum.babylonjs.com/t/gui-control-zindex-update-unlinks-mesh/32113/5 "2022-07-15T12:36:30Z")

</div>

Unassigned @carolhmj on July 15, 2022, 12:36pm UTC


