Forum rules - please read before posting.

Scene Management: Linking AC objects across multiple scenes.

edited April 25 in Technical Q&A

Hi

Want: We would like to split our level (which right now is a single scene in Unity) into multiple unity scenes to improve workflow and ease of multiple people working on the same file. We also want to do this for gameplay reasons. Our game has variations of a main scene with some, but not alot, of differences. We dont want to duplicate much of our AC setup. But we need some thing to be unique.

I've done the following test
1. We have a "Base" scene. This is an AC Scene with all our default AC NPCs + Art, etc in it (and eventually more).
2. We have a "Additive" scene". This is also an AC Scene. It only contains a AC DialogOption. That DialogOption references a AC NPC in the Base scene.
3. The base scene runs a "Add->Scene" to add the Additive scene.

Problem: Of course: the link to the AC_Char across scenes dosent work.

Question:
Does AC support any sort of linking across scene files?
If AC does not support links across scenes, would attempting to solve this be a good idea? I dont know if it fits within how AC works.

Notes

Thanks!

Comments

  • Note: After spending more time on this today, I'm having reasonable success (so far) by having a base AC scene that contains geometry and things that should always be there.
    Then that scene loads a additive scene using the add scene action (including a custom ActionCheck I wrote to decide which additive scene to use.
    That additive scene is also a AC scene as only contains references to itself. It does not have a player prefab set, etc.

    This seems to be working well (so far). We have only tested simple interactions and dialog. Next up is cameras and cinemas.

    While this is less flexible for design, I suspect its a better choice as I dont think referencing objects across scenes will be possible without some sort of custom scene manager that manually hooks up references when the scene is loaded.

  • AC's Constant ID system allows for cross-scene object referencing.

    If you move your Action logic to ActionList assets, then scene objects they reference will rely on Constant ID values to retain links to them.

    You can convert scene-based ActionLists to asset files via the cog menu in their Inspectors. Logic components such as Conversation, Hotspot etc can be set to rely on ActionList asset files, rather than scene-based ActionLists, so you can still have the interactive objects remain in your sub-scenes.

    A guide to using IDs to link scene objects and asset files can be found here.

  • Excellent. Sorry I missed that. Ill review.

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.