Forum rules - please read before posting.

Loading multiple scenes at startup

edited November 2020 in Technical Q&A

Starting an attempt to have multiple scenes with "things going on" with the non-active player in the off-screen scene, based on the encouraging answers in https://adventurecreator.org/forum/discussion/10713/manipulate-inactive-players-data-in-an-off-screen-scene.

I'm using the 3D AC reproduction of the Unity adventure demo as a basis (I have the SecurityRoom scene and the Market scene). I want both scenes to be loaded at startup, so that I can do things in the off-screen scene. So I tried to accomplish this by putting an ActionList on Start Game action list, and putting Add Scene: Security Room and AddScene: Market in that action list. (Sorry for the links to pics, I can't get inline pics working in the forum markdown)

https://www.dropbox.com/s/tp0pa7vmewh0m5d/actionlist on start game.png?dl=0

When I build and run the game, both scenes load up on top of each other:

https://www.dropbox.com/s/k8xwkjehinwunpg/both scenes on top of each other.png?dl=0

I thought only the active scene (SecurityRoom) would be visible, and the Market would be in the "world space" off-screen.

Why are they both visible? I think I'm not understanding something fundamental about Scene:Add loading multiple scenes.

Thanks!

Comments

  • Which scene has the Cutscene that runs these Actions? If its SecurityRoom, there's no need to use a Scene: Add or remove Action to open it again - only one to open Market should be enough.

    AC relies on Unity's own scene addition API for this feature. Scenes can't be repositioned - objects will appear in the same spot as they were when saved.

    If, while in Edit mode, you open SecurityRoom, and then drag the Market scene into the Hierarchy, you should find that their overlaid on top of each other in the same way.

    If you want the two scenes to appear relative to one another correctly, you'll have to reposition all the objects inside one to match up with the other. For example, note where the doorway is in SecurityRoom, and then move all the objects in Market so that the same doorway in Market has the same world-space position as its SecurityRoom counterpart.

  • I was wondering if that's what "world-space" meant. But I could also have the different scenes be scattered around world-space separate from each other, and use hotspots to move from one to the next as normal, rather than lining them up accurately next to each other, right?

  • You can't change the position of an entire scene as one object. If you want two scenes to be open at a time, you will need to reposition the objects inside to have them align correctly. This isn't an AC limitation but a requirement that Unity imposes.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.