# Why is my Scene's Display List null?

**URL:** <https://phaser.discourse.group/t/why-is-my-scenes-display-list-null/2510>\
**Category:** Phaser 3\
**Created:** [May 20, 2019, 8:18pm UTC](https://phaser.discourse.group/t/why-is-my-scenes-display-list-null/2510 "2019-05-20T20:18:28Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![peterdfinn](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@peterdfinn](https://phaser.discourse.group/u/peterdfinn)\
**Post date:** [May 20, 2019, 8:18pm UTC](https://phaser.discourse.group/t/why-is-my-scenes-display-list-null/2510/1 "2019-05-20T20:18:28Z")

</div>

Hello.

I’ve noticed that, for some reason, when I enter a scene of type ShadowMatchingTutorial (a custom type created by my co-worker) for the first time, everything works fine. However, when I later instantiate another ShadowMatchingTutorial scene with a different key, add it to the Scene Manager, and start that scene, it doesn’t work.

Specifically, this scene is one that starts with a character delivering dialogue, which in our game, is represented with bitmap text. When I enter the first scene, the text renders as expected. When I enter the second scene, which is supposed to render the same text, the text doesn’t render at the beginning. After some digging, I have determined that this is because the scene’s displayList property is null.

Why would that be? Does anyone have any idea? I’m completely flummoxed. I would love any help anyone could give me.

---

<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:** [May 20, 2019, 10:54pm UTC](https://phaser.discourse.group/t/why-is-my-scenes-display-list-null/2510/2 "2019-05-20T22:54:28Z")

</div>

How are you adding the second scene?

---

<div class="post-metadata">

**Author:** ![peterdfinn](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@peterdfinn](https://phaser.discourse.group/u/peterdfinn)\
**Post date:** [May 21, 2019, 2:12pm UTC](https://phaser.discourse.group/t/why-is-my-scenes-display-list-null/2510/3 "2019-05-21T14:12:20Z")

</div>

I’m instantiating a new scene by calling the constructor, and then I’m calling “this.game.scene.add”, with the “autoStart” parameter set to “true”.

---

<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:** [May 21, 2019, 5:55pm UTC](https://phaser.discourse.group/t/why-is-my-scenes-display-list-null/2510/4 "2019-05-21T17:55:13Z")

</div>

It’s normally null after a scene is destroyed/removed.

---

<div class="post-metadata">

**Author:** ![peterdfinn](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@peterdfinn](https://phaser.discourse.group/u/peterdfinn)\
**Post date:** [May 21, 2019, 6:19pm UTC](https://phaser.discourse.group/t/why-is-my-scenes-display-list-null/2510/5 "2019-05-21T18:19:45Z")

</div>

Interesting. What I’m doing is, I’m transitioning to a new scene, and then I’m destroying the scene I left. But we’re not attempting to add things to a scene after it’s destroyed; we’re adding something to a newly instantiated scene. Do you think it’s possible that destroying the previous scene somehow interferes with the newly created scene and sets its displayList to null?

---

<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:** [May 21, 2019, 6:37pm UTC](https://phaser.discourse.group/t/why-is-my-scenes-display-list-null/2510/6 "2019-05-21T18:37:19Z")

</div>

I don’t think so.

Maybe try debugging this with [phaser-plugin-scene-watcher](https://github.com/samme/phaser-plugin-scene-watcher).

Also try without transitions.

---

<div class="post-metadata">

**Author:** ![peterdfinn](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@peterdfinn](https://phaser.discourse.group/u/peterdfinn)\
**Post date:** [May 21, 2019, 6:38pm UTC](https://phaser.discourse.group/t/why-is-my-scenes-display-list-null/2510/7 "2019-05-21T18:38:48Z")

</div>

Thanks for recommending the Scene Watcher! It looks cool.

What do you mean by “try without transitions”?

---

<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:** [May 21, 2019, 7:26pm UTC](https://phaser.discourse.group/t/why-is-my-scenes-display-list-null/2510/8 "2019-05-21T19:26:11Z")

</div>

If you’re using [scene.transition()](https://photonstorm.github.io/phaser3-docs/Phaser.Scenes.ScenePlugin.html#transition__anchor) etc., try switching scenes without transitions to see if the problem still occurs.

---

<div class="post-metadata">

**Author:** ![peterdfinn](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@peterdfinn](https://phaser.discourse.group/u/peterdfinn)\
**Post date:** [May 21, 2019, 7:28pm UTC](https://phaser.discourse.group/t/why-is-my-scenes-display-list-null/2510/9 "2019-05-21T19:28:21Z")

</div>

I’m not using scene.transition(), but thanks for the idea!
