# How to accès the Scene Manager outside of scenes?

**URL:** <https://phaser.discourse.group/t/how-to-acces-the-scene-manager-outside-of-scenes/10105>\
**Category:** Phaser 3\
**Created:** [August 12, 2021, 3:32pm UTC](https://phaser.discourse.group/t/how-to-acces-the-scene-manager-outside-of-scenes/10105 "2021-08-12T15:32:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kittykatattack](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/kittykatattack/32/3888_2.png) [@kittykatattack](https://phaser.discourse.group/u/kittykatattack)\
**Post date:** [August 12, 2021, 3:32pm UTC](https://phaser.discourse.group/t/how-to-acces-the-scene-manager-outside-of-scenes/10105/1 "2021-08-12T15:32:03Z")

</div>

Hi Everyone!

Could anyone recommend what the best practise is for access the scene manager _outside of scenes_?  
Usually I would access the scene manager like this, from within a scene:

```javascript
this.scene

```

But, I have a separate, UI built in HTML, that also needs to access it. I understand that `game.scene` is deprecated ([javascript - Phaser 3: Starting a scene (stopping all other running scenes) from the global "game" object - Stack Overflow](https://stackoverflow.com/questions/64048650/phaser-3-starting-a-scene-stopping-all-other-running-scenes-from-the-global))

What the best way is to access provide global access to the scene manager to other, non-Phaser, parts of a codebase?

Thanks!

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [August 12, 2021, 4:06pm UTC](https://phaser.discourse.group/t/how-to-acces-the-scene-manager-outside-of-scenes/10105/2 "2021-08-12T16:06:06Z")

</div>

You can still use [game.scene](https://newdocs.phaser.io/docs/3.55.2/Phaser.Game#scene) for that. And maybe [queueOp()](https://newdocs.phaser.io/docs/3.55.2/Phaser.Scenes.SceneManager#queueOp) if timing is a problem.

---

<div class="post-metadata">

**Author:** ![kittykatattack](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/kittykatattack/32/3888_2.png) [@kittykatattack](https://phaser.discourse.group/u/kittykatattack)\
**Post date:** [August 13, 2021, 8:31am UTC](https://phaser.discourse.group/t/how-to-acces-the-scene-manager-outside-of-scenes/10105/3 "2021-08-13T08:31:24Z")

</div>

Thanks @samme!

My understanding from that StackOverflow link is that using `game.scene` is risky for things like `game.scene.start` as is disregards the game step, and I’m wary of introducing bugs.

So far our workaround for this is having a root BootScene that displays nothing but just hangs around for the entire game so that we have always an instantiated scene that we can reference the SceneManager on for global tasks we need to perform in our HTML UI code. It does feel like a hack though.
