Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] SplitScenes - additive scenes workflow enhancement

Discussion in 'Assets and Asset Store' started by jhughes2112, Feb 5, 2019.

  1. jhughes2112

    jhughes2112

    Joined:
    Nov 20, 2014
    Posts:
    178



    I'm super excited to bring this out on the asset store! Ever think how great it would be to treat scenes as if they were Photoshop Layers? You're in luck, that's what SplitScenes does. It lets you treat one scene as a stack of scenes that you can turn on or off, lock or unlock, etc.

    Link to Website Link to PDF Link to Asset

    While working on a replacement light probe system for Unity, I had to use the additive scene loading function to verify that my light probe system worked the way an additive light probe system should--with chunks in different scenes that you can add or remove at any time. I found that the additive scene system is great as a foundational piece, but the interface was very lacking. So I built a better one. Then I found all kinds of uses for it, like splitting up static geo from props, separating gameplay triggers into their own scene, splitting baked lights from dynamic ones, etc. Once I had it, SplitScenes became a cornerstone of daily work to help people on my team work together without stomping each other's work. Super useful.

    Here's how it works:
    • Create a Root scene. This scene can have other things in it, like a camera or singleton objects or whatever.
    • Add a SplitScenes component to any object in the Root scene, and it manages the stack of sub-scenes. You load this Root scene and the SplitScenes component loads the sub-scenes for you automatically.
    • The custom Inspector lets you manage the stack of scenes, rearrange their load order, etc. It's drag-and-drop to add an existing scene, and has a nice button to quickly add new empty sub-scenes, just like Photoshop does.
    • There's a new lock icon added to the Hierarchy Window to make it quick to edit scenes and prevent editing of other scenes, and those settings persist on your editor only (so it doesn't cause constant check-ins when you change the status).
    • SplitScenes also comes with a simple example of how you can build a progressive level loading system for big world exploration or corridor level transitions.
    • Finally, SplitScenes also automatically manages the Player Settings->Build Scene list, so you don't have to track down every last subscene and add it to the list. It's done for you.
    I hope some of you out there find this useful. It's made a huge difference in our workflow already, and I expect more features to be added in the future. If you have any requests, I'm happy to listen and see if there's a way to work it in.

    Best regards,
    JH
     
    Last edited: Apr 6, 2021
    one_one and guycalledfrank like this.
  2. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,666
    Oh, this is super intriguing! I was also going to do that. How do you send light probe data to shaders? Is it MaterialPropertyBlock, or the whole lookup is performed 100% on the GPU? How's batching working with it? :)
     
  3. jhughes2112

    jhughes2112

    Joined:
    Nov 20, 2014
    Posts:
    178
    Although this is really a forum about SplitScenes, I will mention that Unity supports a custom light probe type. Beyond that, you're on your own. I haven't implemented that part yet myself, but I did look it up in the documentation enough to satisfy my curiosity. However, the easy part is feeding shaders the right data. The hard part is managing the light probe data and interpolating it properly, which is what I've been focusing on so far.
     
  4. jhughes2112

    jhughes2112

    Joined:
    Nov 20, 2014
    Posts:
    178
    I have an update to Split Scenes coming out soon. There's a number of small fixes to the code that make it better behaved when using the UI, added a few minor features like rapid adding of new blank scenes, and fixed some null references. Most importantly, there's a nice PDF document that explains how it's used. Significantly nicer than the readme that I put together in a hurry on initial release! I'll post links soon to the website and documentation (in case you're interested in checking it out before buying).
     
  5. jhughes2112

    jhughes2112

    Joined:
    Nov 20, 2014
    Posts:
    178
    Wow! The asset store team is on fire! The newest version of Split/Scenes is out.

    v1.1 brings you a number of small bug fixes, null checks, and proper tracking of scenes that get moved in the asset database.

    There's a great new feature: a Plus button that quickly adds new empty scenes along side the root scene, automatically names them sequentially and saves them in the same folder, adds them to the build and enables them. It removes a ton of button clicks, making the whole process even easier.

    Check it out!
     
  6. jhughes2112

    jhughes2112

    Joined:
    Nov 20, 2014
    Posts:
    178
    I just pushed a small fix (no version bump) that has corrected paths for the package so everything lives underneath the project folder instead of having a few things outside it. The feedback I got was "keep it tucked in".

    Turns out that several people are buying one of the assets from Reachable Games, then trying out others, and some of them use the same folder name (testScenes). To prevent problems like that, I cleaned up the structure a bit. While I was in there, I slightly improved the documentation too.

    All the users so far have been really enthusiastic about being able to easily split work into more isolated chunks in the editor with no real effort, and most importantly, prevent accidental saving of things you weren't trying to modify. So happy Split/Scenes is working out for them!
     
  7. P3ndragonLLC

    P3ndragonLLC

    Joined:
    Sep 19, 2019
    Posts:
    99
    Hello,

    What does the build portion of the asset do, is that saying to build those scenes, or is that going to build a single scene based on the scenes you selected?

    Thanks,
    Scott
     
  8. jhughes2112

    jhughes2112

    Joined:
    Nov 20, 2014
    Posts:
    178
    Hi Scott,

    The build section is exactly the same as what you see in the File/Build Settings/... List of scenes that get included in a final build. It's convenient to see what is part of the build and edit them on one place. If a scene is not listed there, it cannot be loaded at runtime, bit you can still work and refer to things in those scenes, for example if you have some kind of reference that isn't part of the build, you can still load and unload it.

    Split/Scenes does not merge scenes for you. In fact, it's generally better to keep them separate and async load them.

    Did this answer your question?

    JH
     
  9. P3ndragonLLC

    P3ndragonLLC

    Joined:
    Sep 19, 2019
    Posts:
    99
    Sorry for the late reply :)

    Yeah, that makes sense. Now that I own it, I can see that the Build Scenes is a convenient way to view/manage the scenes to be built whenever you're managing your scenes to load.

    Also makes sense to use the async loading rather than trying to create a single monolithic scene. So far, I'm having great success with using an event manager to pass events between objects between scenes to communicate things like locations to transform to, etc.

    Thanks,
    Scott
     
  10. jhughes2112

    jhughes2112

    Joined:
    Nov 20, 2014
    Posts:
    178
    Hi guys!

    I'm happy to announce the latest build of Split Scenes is live on the asset store.

    What's new?
    • Added delayed activation of all scenes until the whole set is done loading. There seems to be a frame between scene activations, but that's on Unity. I toggle them all exactly at the same time. It's much better now, though, and it always happens in the order you see them in the SplitScenes Window, so physics is much more reliable now.
    • Fixed some of the UI in the Pro skin to look better.
    • Fixed an exception that would happen when playing in the Editor and one of the scenes was disabled for Play, an non-Play-time function was getting called when it shouldn't have.
    • Also properly namespaced the code, some various cleanups here and there.
    Overall, a nice update. Check it out!

    JH
     
    P3ndragonLLC likes this.
  11. jhughes2112

    jhughes2112

    Joined:
    Nov 20, 2014
    Posts:
    178
    Hey SplitSceners,

    Heads up, a major version update is coming in the next day or two. It's a complete rewrite, but the package is much more capable now. Among the new features:
    • New custom inspector instead of a separate editor window.
    • The one major reason to have an EditorWindow up constantly (locking/unlocking) has been moved directly to the Hierarchy Window, so it's even more convenient to lock and unlock scenes. Now that Unity has a way to disable picking in the SceneView, the lock also toggles that for you.
    • Added popups to let you control whether a locked scene should be saved or not, or if it should be discarded and reloaded. More control, when you need it!
    • There's a fully reference counted scene loading system at the core, now. I've included a basic big world roaming system as an example of how to put together such a thing. It's super simple.
    • Added a mechanism to enable a GameObject when a scene set is active and disable it when the scene set is unloading. You can do whatever you want with this, simplifying the initialization or tear down of things.
    Also, I'm going to put together a nice video to demo the new system so it's clearer how it works and what you can do with it. SplitScenes now has features you find in packages at the $45 level. So I'm probably going to bump it up a little. Buy it now if you're interested, before the price goes up.

    Thanks!
    JH
     
  12. jhughes2112

    jhughes2112

    Joined:
    Nov 20, 2014
    Posts:
    178
    Version 2.0 is live on the Asset Store. Here's that walkthrough video I promised:

     
  13. MorpheusZG

    MorpheusZG

    Joined:
    Jan 6, 2020
    Posts:
    18
    Does this solve cross-scene referencing?
    Couldn't find a mention of this in the docs or in the video.
     
  14. jhughes2112

    jhughes2112

    Joined:
    Nov 20, 2014
    Posts:
    178
    No, I am not attempting to do that with SplitScenes. The way I handle that is by having a script that does the hookups once all the scenes are activated. When SplitScenes is done starting all of the scenes, it enables a game object of your choosing, so you can put scripts on it that can work like Awake and Start.