Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

Advanced Additive Scenes: Multi-Scene Editing. Now With Free Demo!

Discussion in 'Assets and Asset Store' started by Jodon, May 20, 2014.

  1. snusfen

    snusfen

    Joined:
    May 20, 2015
    Posts:
    43
    Hi Jodon

    Do you know if there are any issues with occlusion culling in combination with AAS? We're having an issue where builds arbitrarily crash when we build occlusion culling (no problem in the editor). I don't know if it has anything to do with AAS, but I just did a new build of the same scene, but removed the attached sub-scenes, and so far it hasn't crashed.

    Obviously not much to go on, but is there anything you can tihnk of that might be the issue? Any settings or something in the setup that I should double-check, that might be setup incorrectly? We're using 5.2.3f1

    Oh, and btw, we updated the plugin the other day, and most objects in the hierarchy have letter combinations after them. I've tried to find documentation for what they mean but have failed. Is there a description somewhere?
     
    Last edited: Nov 25, 2015
  2. JoeMcT17

    JoeMcT17

    Joined:
    Oct 6, 2015
    Posts:
    2
    That's great! Thanks. I'll send you an email
     
  3. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    I'm not aware of any, but last build I tested for Occlusion Culling was AAS 1.91 on Unity 5.2.1f1 I believe (and only for WebGL). Are you mixing and matching BakedIntoScene with LoadAdditive scenes? I'm trying to think why it wouldn't work, but I was pretty sure occlusion data doesn't actually rely on geometry at runtime. Try this: Load up the level unlock then nuke all of the SubScene objects (but not the data underneath), then try a build with that level see if there's an issue. You might have to fix-up the HideFlags (there's a FIXME button in the Hierarchy window for this if it happens) which leads me to:

    I'm surprised you're seeing this, maybe I mixed up a flag somewhere. In your Editor Preferences / Additive Scenes dialog, do you have the Debug options checked? If so, that would be why... if not, then my bad and I should fix that. Here's what they mean:

    They are shorthand for the HideFlags of the GameObject. The plug-in heavily relies on changing HideFlags all over the place (hacky, but it's the only way pre-5.3). This mode is meant to debug what's going on and DS meants "DontSave" with "NE" meaning "NotEditable". So DSNE is fine when it's locked and DS when it's unlocked but in a SubScene. DS or NE are not correct if it's outside of a SubScene in which case you should get a "FIXME" button.

    Cheers.
     
  4. benblo

    benblo

    Joined:
    Aug 14, 2007
    Posts:
    469
    So I've upgraded to 1.91, some feedback:
    • "objects shifting position after play" issue is gone, so hurrah for that :) !
    • I've recompressed all scenes: file size is halved, hurrah again! We have 135 subscenes which totaled 78MB, now down to 40MB!
      • I saw "recompress" is just iterating over subscenes and calling open/save; does that mean we have to manually do this from time to time, or are you now able to save compressed right away?
    • saving a master scene, or any scene for that matter (try a new empty scene) creates a "!SceneData" GO at the root; the culprit is OnWillSaveAssets, which plainly says "Force a creation of SceneData"... why? I don't see the reason for this. Saving the currentScene should save subscenes, sure, but why would the currentScene absolutely need a SceneData? I've commented this out and it works fine.
    • reverting open subscenes in source control is supposed to trigger a "do you want to reload?" dialog... now it's spotty, it works Sometimes But Not Always™ (don't have a clear repro yet). Doesn't seem to work if I revert a bunch of subscenes at once, but even if I revert only one subscene it doesn't always work... maybe it only works when reverting the first subscene in the hierarchy?
    • _sceneAssetGuid became _sceneAsset Object... except scene asset refs are always null in builds :s ! I don't know why, and it sucks, but there it is. So LoadingSubSceneObjects.Contains(_sceneAsset) is true for any scene. I feel bad because I suggested using refs instead of guids, big fail there...
    • just out of curiosity, I've seen "PIE" a few times in your code, what does it mean?
     
  5. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    Yup! v1.92 just got approved in the store too, so you can upgrade to that to fix some issues...
    Yes you will have to recompress until 5.3 where hopefully I will have a new method to save where it saves compressed. This is pending though, haven't done it yet.
    Yes this is intended because the SceneData is what's used to figure out how to load/unload scenes. Someone can just import your scene as a SubScene without ever saving it through the menu and then they're messed up...
    The code works by detecting asset imports. This is because most of my work is done with SVN outside of Unity, so I needed a way to detect external changes. Maybe there's a situation where it doesn't detect the file's changed... maybe it's revert on a file that was never resaved?
    Yah :( it's caused some issues but I believe I have a fix in 1.92.
    PIE comes from my old days with Unreal, "Play-In-Editor".
     
  6. snusfen

    snusfen

    Joined:
    May 20, 2015
    Posts:
    43
    Good news (for you): It looks like it might not be a AAS issue. It seems to be something inside one of the baked scenes that is causing issues. The relevant sub-scene is only filled with sound objects, however, so that it would cause issues for the occulusion culling makes it even more peculiar.

    I double-checked, but I don't have any of the debug options in the preferences set.
     
  7. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    New version of AAS (v1.92b) has been submitted to the store. It will fix issues with nested scenes and disabled objects not being treated as part of your LoadAdditive/LoadAdditiveAsync scenes.
     
    Tony707 and hopeful like this.
  8. Kiupe

    Kiupe

    Joined:
    Feb 1, 2013
    Posts:
    528
    Hi,

    Just wanted to know if the new multiple scenes editing of Unity 5.3 is the same as AASS or if AASS offers more functionalities ?

    Thanks
     
  9. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    It's different functionality. This plug-in was made for Unity versions prior to 5.3. There will be a new, separate plug-in for bringing what the extended functionality that AAS had for 5.3 and beyond. Current AAS users will get this new plug-in for free*.

    *assuming Unity allows a free upgrade path
     
    hopeful likes this.
  10. krides

    krides

    Joined:
    Apr 7, 2011
    Posts:
    35
    Hi!

    We're having a (massive) problem with light baking. We are using Unity 5.3.0f4 and AAS 1.92.

    In my setup, I have the main scene and two child scenes. Each child scene has its own geometry and lights. When I do Tools → Additive Scenes → Bake Lightmaps, it thinks for a few seconds, and then a LightingData.asset is created for the main scene, but it is empty and no lightmaps are generated for child scenes or the main scene.

    When I try to use the other workflow you explain in the documentation (unlocking children and baking lights as if everyone was just in the same scene), the light bake files appear for the main scene with all the objects in both children in there, and in the editor everything looks okay. However, when I press Play, all objects appear as if no light bake is present again. When I stop, all bakes are broken again. The files are still there, they are still referenced in the Lighting window, but the objects no longer appear lightmapped.

    If I bake lights in children separately, the bakes never appear in the main scene in Editor or Play mode.

    Please help :)

    Cheers,

    Sergey
     
  11. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    Hello Sergey,

    AAS does not officially support 5.3 yet. There were some changes made just before release that made it impossible to test lightmapping as it was broken in the last beta. We are working on a fix, but it's going to be at least another week. In the meantime if you're able to use real-time lighting please use that until the baking is functioning again.
     
  12. krides

    krides

    Joined:
    Apr 7, 2011
    Posts:
    35
    Thank you for the quick reply and clarification. Looking forward to the new version supporting 5.3 then! Our game's graphics relies heavily on GI/reflections/light probes/etc. baking, and we also need your plugin to collaborate, so it is really important to us that this works.
     
  13. nrvllrgrs

    nrvllrgrs

    Joined:
    Jan 12, 2010
    Posts:
    20
    I'm excited. Can't wait!
     
  14. krides

    krides

    Joined:
    Apr 7, 2011
    Posts:
    35
    Hi Jodon,

    Happy new year!

    Any chance we could have an updated ETA for the new version of the plugin with 5.3 support?

    Thanks,

    Sergey
     
  15. Anderz

    Anderz

    Joined:
    Dec 5, 2013
    Posts:
    24
    Hi, we have a bug where the connected sub-scenes are lost when the parent scene is version controlled via Perforce.
    We have to manually re-link the sub-scenes in the editor of every other computer (that didn't originally commit the scene), including the one we build with. This is a real headache for our build process.

    We're using Unity 5.2.3 Pro and Windows 10.
     
  16. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    Hello Anderz,

    Are you using P4Connect or Unity's built-in version control with a Team License? P4Connect is Perforce's attempt at writing a plug-in and has caused nothing but headaches for my team, so much so that we ended up ditching Perforce altogether. It does not correctly detect changes in assets, especially not with other third-party plug-ins such as AAS. We didn't have as many issues with Unity's built-in implementation of P4, but have never seen an issue where the data unlinks. Can you inspect the serialized data (by enforcing text-mode serialization in the Editor preferences?)

    Cheers.
     
  17. Anderz

    Anderz

    Joined:
    Dec 5, 2013
    Posts:
    24
    Hi Jodon,
    Yeah we're using the built-in Perforce versioning and Text Serialisation, as we had a similar experience with P4 Connect.

    We just did a little experiment. I committed a scene with a sub-scene, and my colleague got the update, opened up the scene in Notepad before Unity could get its hands on it, and the references to the sub-scene were still in tact.

    Then he opened the scene in Unity. The Sub-scene component immediately complained off a missing sub-scene, and then when he saved the scene, the reference to the sub-scene scene was deleted from the scene data when we viewed it again in Notepad.

    We also did a test to make sure our subscenes had the same GUIDs and fileIDs, which they did.

    Not sure if that gives you any lead, but it seems like Perforce synced as expected, and the bug happens on scene load, where it loses the connection.
     
  18. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    Can you do two more tests for me please:

    1. Confirm this doesn't happen when not using P4. That'll just be a sanity check.
    2. Unlock the scene before opening up after a sync.

    My theory is that the scene may still be locked when opened, thus not allowing the addition of new objects (the SubScenes).

    Cheers.
     
  19. Anderz

    Anderz

    Joined:
    Dec 5, 2013
    Posts:
    24
    Thanks Jodon for your help with this.

    Test 1: We tried exporting the scene as a unity package, and importing it on another computer synced to the same project (so the IDs should be the same). No dice. Same error. (Just to be clear, reloading the scene from the same PC/Unity Editor that set the subscene works as intended.)
    Test 2: Didn't work. Unlocking first (both scene and meta) had no change in the outcome.

    So looks like it might not be Perforce after all, but a problem with Unity Resources on each PC?
     
  20. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    To be clear, was this a project that didn't have Perforce enabled at all? I have yet to see anyone else report this issue, or see it myself. Granted, I use Subversion with Unity 4.x and recently switched over to my newer plug-in in my 5.x project, but I had been using the latest AAS for a couple of weeks with 5.3.1 before the switch.
     
  21. TagScott

    TagScott

    Joined:
    Oct 17, 2014
    Posts:
    21
    Hi @Jodon, do you know if AAS works with 5.3.2? I'm getting the following error when running:

    InvalidOperationException: This cannot be used during play mode, please use SceneManager.LoadScene()/SceneManager.LoadSceneAsync() instead.
    UnityEditor.SceneManagement.EditorSceneManager.OpenScene (System.String scenePath, OpenSceneMode mode) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorSceneManagerBindings.gen.cs:30)
    CodingJar.AdditiveScenes.LegacyBridge.OpenSceneAdditive (System.String path)

    I'm using AAS 1.93
     
  22. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    Unfortunately version v5.3.1p4 has deprecated using scene loading from the editor while in play mode. As such, the plug-in is broken from then on until Unity provides a fix. Please chime in at: http://forum.unity3d.com/threads/new-multi-scene-changes-in-5-3-1p4-issues.381338/ in order to help gets this fix expedited.

    Feel free to e-mail me for the 'beta' version of my new plug-in (I don't consider it beta anymore, but I haven't made a tutorial video for it yet, hence it's not yet released). The new plug-in allows cross-scene references with non-baked scenes which will be a work-around until this issue is solved.
     
    Last edited: Feb 1, 2016
  23. TagScott

    TagScott

    Joined:
    Oct 17, 2014
    Posts:
    21
    Thanks but it's ok I'll just roll back to a previous Unity version for the time being.
     
    Last edited: Feb 2, 2016
  24. TagScott

    TagScott

    Joined:
    Oct 17, 2014
    Posts:
    21
    I'm getting a different error with Unity 5.3.0f4 using AAS 1.93. Any ideas?

    An abnormal situation has occurred: the PlayerLoop internal function has been called recursively. Please contact Customer Support with a sample project so that we can reproduce the problem and troubleshoot it.
    UnityEditor.SceneManagement.EditorSceneManager:OpenScene(String, OpenSceneMode)
    CodingJar.AdditiveScenes.LegacyBridge:OpenSceneAdditive(String)
    CodingJar.AdditiveScenes.SubSceneEx:EditorLoad(SubScene, Boolean)
    CodingJar.AdditiveScenes.AdditiveSceneSaveProcessor:LoadAllSubScenesForBaking()
    CodingJar.AdditiveScenes.AdditiveSceneSaveProcessor:BakeScene()
     
  25. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    I don't recall the exact reason I switched to Unity 5.3.0p2 but I believe it may have something to do with these issues. I know p2 & p3 were the stable ones, with p4 being the one that broke functionality.
     
  26. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    Everyone should know that the new plug-in for Unity 5.3 is being submitted to the Asset Store today. You can view the new thread here. Support for Advanced Additive Scenes will stay in this thread.
     
  27. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,961
    So ... AAS is broken, and AMS works ...? The two products seem alike. Why are they split?
     
  28. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    In short because the technical debt for supporting all Unity versions plus the new 5.3 functionality is too high, I just can't do it. Everyone should know that if you bought AAS, AMS is a free upgrade (this is how I understand the upgrade system by their rules, if not, it costs $1 to upgrade). The long version:

    As of 5.3.1p4, AAS has major issues which I cannot fix and the time required to do these fixes are a losing battle. Every time Unity releases a new version, it breaks something in the plug-in, they are just releasing too fast and with disregard to existing functionality -- case-in-point, the Asset Store Utilities for uploading to the Asset Store come with a warning that it uses deprecated functionality and needs to be upgraded. This is Unity's own product, used daily, which can't keep up with development... sigh. Since Unity 5.x, it's been a struggle to keep AAS working with every new version (there's 4 different versions submitted to the Asset Store, for 4 different sets of API deprecations).

    Unity 5.3 brought about totally new ways of handling scenes, so it was the right time to leave AAS behind and rewrite it from scratch. The hope is that by building it on top of engine-level functionality, it will be less prone to breaks. I'm really hoping Unity listens to feedback and restores some of the functionality they recently broke, but I feel they're more likely to listen if I'm using their intended APIs rather than a lot of unsupported and undocumented ones.

    So that's the long reason why I started abandoning development on AAS, I plan to deprecate it as soon as I hear that the transition to AMS is smooth for people. There is one more update going through the store right now which fixes minor issues and allows you to migrate to AMS smoothly.
     
    TagScott likes this.
  29. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,961
    Thanks for the clarification. Looking forward to AMS! :)
     
    TagScott likes this.
  30. snusfen

    snusfen

    Joined:
    May 20, 2015
    Posts:
    43
    Hey Jodon

    I was about to write a script that let me unlock the current sub-scene that my selected object belongs to, but couldn't find an exposed method that let me do so. Is there any method available to achieve this?
     
  31. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    It's not exposed (though you have the source code included with a menu option that rebuilds the dll). The function you're looking for is an extension function in SubSceneEx called EditorConditionalUnlock. The class is marked internal, which you'd need to change to public.
     
  32. MrIconic

    MrIconic

    Joined:
    Apr 5, 2013
    Posts:
    176
    What is AMS? :oops:
     
  33. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,961
    MrIconic likes this.
  34. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    Tony707 and hopeful like this.
  35. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    A quick update: I think I've managed to track down the loading issues with Advanced Additive Scenes on Unity 5.3.2. Version 1.95 has been uploaded to the Asset Store and is pending approval. I would still highly recommend Unity 5.3+ users convert to Advanced Multi-Scene for the other benefits, but this will allow Advanced Additive Scene users to continue development until they are ready to upgrade.
     
  36. patwolf

    patwolf

    Joined:
    Feb 16, 2014
    Posts:
    3
    AMS looks like a great tool! Has it been tested with Unity 5.4 yet? Thanks
     
  37. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    It has issues in 5.4, there's a Unity thread discussing the engine changes that broke it. The conclusion was they'll fix the engine, though I don't think a time frame was given. I'm looking to make it compatible within the next two weeks.

    Cheers.
     
  38. We're using an old version (I think 1.74 from a year ago) with some custom changes and it has worked so far until 5.3.2p1.

    Now we are testing Unity 5.4.0b15 and we are getting a few errors at build time such as:

    get_transform is not allowed to be called during serialization, call it from Awake or Start instead. Called from MonoBehaviour 'SceneData' on game object '! CodingJar.AdditiveScenes.SceneData'.
    See "Script Serialization" page in the Unity Manual for further details.
    UnityEngine.Component:get_transform()
    CodingJar.AdditiveScenes.SceneData:OnBeforeSerialize() (at Assets/Plugins/AdditiveScenes/Scripts/SceneData.cs:98)
    UnityEditor.BuildPipeline:BuildPlayer(String[], String, BuildTarget, BuildOptions)

    FindObjectsOfType is not allowed to be called during serialization, call it from Awake or Start instead. Called from MonoBehaviour 'SceneData' on game object '! CodingJar.AdditiveScenes.SceneData'.
    See "Script Serialization" page in the Unity Manual for further details.
    UnityEngine.Object:FindObjectsOfType()
    CodingJar.AdditiveScenes.SceneData:OnBeforeSerialize() (at Assets/Plugins/AdditiveScenes/Scripts/SceneData.cs:100)
    UnityEditor.BuildPipeline:BuildPlayer(String[], String, BuildTarget, BuildOptions)

    From the discussion I've seen on the AMS thread it seems it would be too much of a hassle for us to upgrade to AMS now since our project is relatively big (with subscenes not always at the root) and we're nearing the end.

    Is there a way to make our current version compatible with Unity 5.4? Possibly just changing SceneData.cs to accommodate 5.4?
    Is there a version of AAS that's compatible with Unity 5.4?

    Cheers!
     
  39. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419