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.
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?