# How does attaching scripts to game objects in the Editor work?

**URL:** <https://forum.babylonjs.com/t/how-does-attaching-scripts-to-game-objects-in-the-editor-work/34662>\
**Category:** Questions\
**Created:** [October 10, 2022, 10:46pm UTC](https://forum.babylonjs.com/t/how-does-attaching-scripts-to-game-objects-in-the-editor-work/34662 "2022-10-10T22:46:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edjees](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/edjees/32/27392_2.png) [@Edjees](https://forum.babylonjs.com/u/Edjees)\
**Post date:** [October 10, 2022, 10:46pm UTC](https://forum.babylonjs.com/t/how-does-attaching-scripts-to-game-objects-in-the-editor-work/34662/1 "2022-10-10T22:46:08Z")

</div>

Hey all, quick question from someone moving to Babylon from Unity:

Attaching scripts to game objects in the Babylon Editor is straightforward.

However, how does do these scripts execute/exist after scene generation (during execution)? Specifically, how would you do it programmatically?

Is it just attaching all the class methods within the class the script exports to the game object (mesh, transformnode) then attaching the “onUpdate” method to the render loop?

Any information would be really helpful. Please let me know if I’m being too vague.

---

<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:** [October 10, 2022, 11:22pm UTC](https://forum.babylonjs.com/t/how-does-attaching-scripts-to-game-objects-in-the-editor-work/34662/2 "2022-10-10T23:22:12Z")

</div>

cc @julien-moreau

---

<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:** [November 8, 2022, 1:49pm UTC](https://forum.babylonjs.com/t/how-does-attaching-scripts-to-game-objects-in-the-editor-work/34662/3 "2022-11-08T13:49:44Z")

</div>

bump @julien-moreau for visibility
