Adding new scenes in-game via bge

I’m working on a project in which there will be multiple in-game screens, most of which will be interactive (clickable, etc). I’m currently examining different methods of implementing this.

What would seem to be the ideal method would be to have each screen create a new scene when initialized, where its screen objects are placed, moved, etc as needed. that scene’s camera output is then sent as a texture to the screen object in the main scene.

My current problem is that I know of no way to add a scene dynamically in blender. If anyone has solutions, suggestions, or alternate implementations, I would appreciate the help.

Details of possible use:

There will be a dynamic number of screens, and potentially multiples of each type; I think this prevents me from creating scenes for each in advance

The screens are likely to have several dozen objects each, which would seem to me to prevent simply displaying them in the main scene as stacks of 2d objects. (the depth would be apparent to anyone viewing from the side)

My project so far is heavily python oriented, so there’s no issue with python use.

You can use the scene actuator and/or the BGE API.

That was my first thought as well, however if I try to add a new scene that is not in the .blend or a library, I get an error.

For example, when I call

“bge.logic.addScene(‘0x4863aa59’)” # a name that is not in the blend file or an imported library

I get back:

“warning: scene 0x4863aa59 could not be found, not added!”

I’ve tried this with a simple test blend file where the only thing happening is a simple .addScene(‘test_scene_name’), and it responds similarly in that case as well.