# \[Unity toolkit\] Game object mesh

**URL:** <https://forum.babylonjs.com/t/unity-toolkit-game-object-mesh/5007>\
**Category:** Questions\
**Created:** [August 9, 2019, 1:34am UTC](https://forum.babylonjs.com/t/unity-toolkit-game-object-mesh/5007 "2019-08-09T01:34:30Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![MackeyK24](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mackeyk24/32/3741_2.png) [@MackeyK24](https://forum.babylonjs.com/u/MackeyK24)\
**Post date:** [August 10, 2019, 4:41am UTC](https://forum.babylonjs.com/t/unity-toolkit-game-object-mesh/5007/21 "2019-08-10T04:41:21Z")

</div>

> [@i73](#):
>
> protected start() :void { const swap:BABYLON.AbstractMesh = this.getProperty(“meshToSwap”); console.log(swap); const meshid:string = swap.id; console.log(meshid); var s = this.scene.getMeshByID(meshid); var ss = this.scene.getMeshByName(swap.name); const tnode = this.scene.getMeshByID(meshid); console.log(tnode); }

Still wrong here… But the video i talk about the details of whats what…

I.E. Should be

```auto
const swap:any = this.getProperty("swap");

```

But here is the video… Please watch… it will clear up a few things for you 🙂

[http://mackey.cloud/files/videos/TestScript1.mp4](http://mackey.cloud/files/videos/TestScript1.mp4)

---

<div class="post-metadata">

**Author:** ![i73](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/i73/32/3167_2.png) [@i73](https://forum.babylonjs.com/u/i73)\
**Post date:** [August 10, 2019, 8:31pm UTC](https://forum.babylonjs.com/t/unity-toolkit-game-object-mesh/5007/22 "2019-08-10T20:31:17Z")

</div>

Yes I fully understand the Toolkit and what is needed now after spending some time last week reading the source, I just didn’t know it won’t access a object if it’s off in the Unity inspector, I thought I was doing something wrong.

Honestly thank you so much for all your help and the video, I figured a workaround would be set the visibility at start and then when the user clicks on the object set the `isVisible` back to true:

```auto
            var swap:BABYLON.AbstractMesh = this.getProperty("swap", null);
            if(swap != null){
                const meshid:string = swap.id;
                this.scene.getMeshByID(meshid).isVisible = false;
            }

```

I wasn’t able to get the unity Inspector mesh renderer to work when I clicked it off.

[Previous page](https://forum.babylonjs.com/t/unity-toolkit-game-object-mesh/5007.md?page=1)
