# .babylon file Format - Attach Action to Scene

**URL:** <https://forum.babylonjs.com/t/babylon-file-format-attach-action-to-scene/37206>\
**Category:** Content creation (3dsMax, Maya, Blender, glTF)\
**Tags:** export, action, scene\
**Created:** [January 9, 2023, 7:45am UTC](https://forum.babylonjs.com/t/babylon-file-format-attach-action-to-scene/37206 "2023-01-09T07:45:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rettifan](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@rettifan](https://forum.babylonjs.com/u/rettifan)\
**Post date:** [January 9, 2023, 7:45am UTC](https://forum.babylonjs.com/t/babylon-file-format-attach-action-to-scene/37206/1 "2023-01-09T07:45:30Z")

</div>

Hi,  
the “global structure” of the .baylon file format has a top level “actions” property.

> **[The .babylon File Format | Babylon.js Documentation](https://doc.babylonjs.com/setup/support/.babylonFileFormat#global-structure)**
>
> Dive deep into the inner workings of the .babylon file format.

How do I add an Action to a Scene so that it is exported to the top level “actions” array. (I’m not refering to actions of e.g. a mesh )

Frank

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [January 9, 2023, 10:54am UTC](https://forum.babylonjs.com/t/babylon-file-format-attach-action-to-scene/37206/2 "2023-01-09T10:54:52Z")

</div>

The global “actions” property in a .babylon file comes from the serialization of `scene.actionManager` (if defined).

So, you must set a value to `scene.actionManager` and register actions with it to populate the global “actions” property.

Just for fun, I asked ChatGPT:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/b/9/b9c535df2da0763beffc1b5eeb274a15fc0f4336.png)

The answer is the right one, except it is missing `scene.actionManager = new BABYLON.ActionManager(scene);` in the code example!
