Search Unity

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

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

  1. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    Just got an e-mail from Unity today that they fixed the major issues with AAS + 5.2 in the newly released patch 5.2p1. I will need to verify + make another release to restore functionality to 5.2 users but it sounds promising.
     
    hopeful and Tony707 like this.
  2. Unreal-Vision

    Unreal-Vision

    Joined:
    May 6, 2013
    Posts:
    58
    Thanks Jodon,

    Wait for news about new fixes :)
     
  3. neildevine

    neildevine

    Joined:
    Aug 24, 2015
    Posts:
    12
    Hey Jodon, just updated to 1.82, still on 5.1.2f1. I think I have figured out an issue I have. I use perforce and p4connect, scenes are in exclusive checkout mode, Ctrl+s does not work for me if the main scene is already checked out, File->Save does. I tried without perforce and ctrl+s works fine. maybe something to check in the general flow of things.
     
  4. neildevine

    neildevine

    Joined:
    Aug 24, 2015
    Posts:
    12
    a bit more info, none of the save flows actually checks out the file with p4connect, however if you lock the sub scene and say yes to the save dialog then it will check out the file.
     
  5. benblo

    benblo

    Joined:
    Aug 14, 2007
    Posts:
    469
    Yes, it seems that the "shifting positions" bug has been resolved with 5.2.0p1... so far. We haven't tested that much yet. And now we're kinda scared that it'll explode in our face again, this seems so fickle!
    Spoke too soon, the bug is still here, and it did explode again.
    ... can't wait for 5.3 and the proper multi-scene support!
     
    Last edited: Sep 25, 2015
    Tony707 likes this.
  6. luminance

    luminance

    Joined:
    Nov 21, 2012
    Posts:
    11
    Hey Jodon, do you know if it would be possible to re-create identical cross-scene references if the referenced assets are the same? It inflates the size of my diffs and I end up committing the scene more often than I need to. Maybe the cross-scene references can be kept around in-between locks so they aren't recreated?
     
  7. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    Looks like I missed a merge:

    Code (CSharp):
    1.     public static void EditorConditionalUnlock( this SubScene subScene )
    2.      {
    3.        if ( !subScene.IsLoaded() )
    4.          return;
    5. // This part was missing
    6. if ( !AdditiveScenesVersionControl.SafeCheckout( subScene.GetSubScenePathname() ) )
    7.   return;
    8.        SetIsLocked(subScene, false);
    That explains why it was working for me but was never checked in. Note this is the only check for checking-out a file (in the unlock function). This will make it in to 1.83 or later. Newest version looks promising (5.2.1p1). No issues I've run into YET (no crashes that is). Just starting my weekend development.
     
    hopeful likes this.
  8. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    I'll look into it this weekend. I believe I don't keep them around because removal is a signal that "it's been handled".
     
  9. snusfen

    snusfen

    Joined:
    May 20, 2015
    Posts:
    43
    We're using FindObjectOfType in some editor scripts, and noticed it doesn't fetch objects from sub-scenes unless you've made changes to them (I assume that causes them to be properly loaded?)

    Is there any workaround for this, other than doing GetComponentInChildren on the subscene object?
     
  10. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    Haven't seen that one. I assume this is at edit-time? Are you using Resources.Find...? I use that all around the plugin so I can't imagine it failing... GameObject.Find ignores disabled objects I found a long time ago.

    My typical pattern is Resources.FindObjects... Followed by EditorUtility.IsPersistent to figure out if it's an asset or lives in the scene. Give that a shot.
     
  11. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    Regarding Perforce support, I tried using Perforce this weekend and it was beyond horrid. It's pretty much unusable (not in my plug-in -- in Unity). Apparently I landed on a bad version: http://forum.unity3d.com/threads/5-...ol-hangs-editor-due-to-fstat-spam-bug.355906/. Besides that small code change posted earlier, I'm keeping VCS support as-is until they fix the issues.

    As far as news goes: I've removed more of the Lightmap hacks that never quite worked right. We will be relying on Unity's lightmapping features going forward. So far the only fixes have been in cross-scene referencing.
     
  12. snusfen

    snusfen

    Joined:
    May 20, 2015
    Posts:
    43
    Thanks for your prompt response.
    Yeah, at edit-time. Not using Resources.Find, but rather FindObjectByType<T>(). All the objects are enabled, but the latter seems to fail to find the objects residing inside subscenes until they've been interacted with. Find(string name) does work, however.

    Resources.FindObjectsOfTypeAll<T>() does work, though. It fills my needs in this case, thanks!
     
  13. neildevine

    neildevine

    Joined:
    Aug 24, 2015
    Posts:
    12
    Hey Jodon, I have another issue here. I have a boot scene, and a main scene. Main scene contains a bunch of subscenes.

    When I load the boot scene, after a few seconds the main scene is loaded through a LoadLevel call.
    In the main scene I have a manager that does a bunch of FindOBjectWithTag calls on its Awake, the objects it is looking for is in one of the subscenes.

    I have 3 behaviors:
    - In Editor, load and run main scene, everything is dandy
    - In Editor, load and run boot scene, main scene is loaded through code, manager never finds the objects
    - Standalone, run boot scene, everything is fine.

    Is this a known issue ?

    Thanks

    NEil
     
  14. henkjan

    henkjan

    Joined:
    Aug 1, 2013
    Posts:
    122
    I use Unity 4.6.8 an in my main scene I have 3 sub scenes. In one subscribe are the lights etc.

    Lots of times I need to rebake the light maps because they are broken or partly ok. Also the light maps array grows till it's full and I have to clear it again.

    How do I fix this?

    UPDATE: I cleared any lightmaps in the sub scenes and now the lightmap is ok but each time I open the main scene 3 more lightmaps are added to the lightmap array! (I have 3 sub scenes).
    Is there a way to stop this from happening?
     
    Last edited: Oct 1, 2015
  15. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    Unfortunately it is. This is a bug in Unity where PostProcessScene runs after Awake() is called in the Editor. Feel free to log a bug with Unity, they always say "as designed". More like "as the code currently works" :S. Here's a link where I explore this (and other issues): Unity Initialization Order.
     
  16. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    I had a bunch of hacky work-around for Lightmaps in 4.x since they aren't quite right with additive scenes. If you send me a small repro case I'll fix it again in the next release. Multi-scene lightmap bakes are only supported in 5.2 and later (and 5.2 is still really buggy unfortunately).
     
  17. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    News Update & Mini-Roadmap

    I've fixed some bugs and am almost ready to release a new version to the Asset Store. If you would like to "beta test", send me an e-mail and request v1.9x. This version (and probably a few patch versions) will support Unity 4.x but v2.0 and on-wards will not support 4.x. If you have lingering 4.x issues and don't plan to upgrade to 5.x, please let me know so I can address them.

    Unity 5.3 is announced and their functionality looks promising so this plug-in will shift into supporting advanced features for multi-scene editing. The first release of 'v2.0' will support cross-scene referencing and a new event system for cross-scene communication. If you'd like to preview v2.0 features, e-mail me and request to be on the v2.0 beta list.

    Issues Addressed in 1.9x:
    • Unity 5.2.1 and onwards is supported properly (you can use baked subscenes again)
    • Issue where objects would shift positions after save is addressed
    • Rudimentary support for P4 (hard to test since 5.2 P4 support is so messed up)
    • There will be a menu item for re-saving your scenes in compressed (stripped) format. This greatly reduces the size of your scene and diffs nicely with version control.
    • Cross-scene referencing fixes for complex (hacky) cases
    • Big internal refactor to reference Scene Assets directly rather than GUID
    • Big internal refactor to strip out all of the lightmap hacks (we won't support pre-5.2 workflows; will continue to look at supporting 4.x).
    Issues Considered for 1.9x future releases:
    • Multiple sub-scene instance editing
    • SubScene.isLoading or similar enum
    • Making sure animations work on sub-scenes (this has been on my todo forever, if you're affected by this let me know)
    • Scene being don't load + unlocked will exit playmode with the scene being locked
    • Shortcuts for unlocking a parent scene when you're trying to work on an object
     
    Tony707, luminance and hopeful like this.
  18. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    The latest version of AAS has been approved by the asset store. Remember to subscribe to asset updates through the Asset Store for the latest news. For the changes see the previous post.
     
    Last edited: Oct 14, 2015
  19. Tony707

    Tony707

    Joined:
    Jun 15, 2015
    Posts:
    37
    Hi,

    Version 1.90 seems available on the asset store since Friday.

    Is it safe to upgrade to Unity 5.2.1 then ?

    Thank's
     
  20. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    Hey Tony, yes it's safe. Cheers!
     
    Tony707 likes this.
  21. damard

    damard

    Joined:
    Jul 22, 2015
    Posts:
    6
    Hey Jodon,
    We are having several issues using lightmaps with the plugin. We are running unity 5.2.1p3 with the latest CodingJar. I do my light bakes using CodingJar > Additive Scenes > Bake Lightmaps from my main scene as suggested in the document. Once they are baked, everything seems fine. If I save and reload the scene, everything is there as expected. Now, if I play the scene, lightmaps break. If I build the game, no lightmaps there either. If I collapse the scene (delete the coding jar components), save the scene and reload, lightmaps gone too. If I unlock a subscene from the main scene, modify it, then lock/save it, light maps gone. What is the correct workflow of generating the lightmaps using your plugin? (And also to keep working on the project.) The header in the doc says to bake from the menu tool while the section on lightmap says to do it manually in each subscenes. (Even then, editing from the main scene breaks the lightmaps after adding or removing an object). When I say break, I mean that the object's lightmap IDs are reset to 65535. (We use bake into scene on the subscene gameobjects)
     
  22. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    Hey Damard,

    Unfortunately we are still in a bit of transition in figuring out what Unity is going to do with their multi-scene editing. Right now the menu item for baking lightmaps works only if your scenes are set to Load Additive (or Load Additive Async). This is Unity's built-in functionality. Using this functionality will separate the lighting into the respective SubScenes.

    If you plan to only use Bake Into Scene, then you can use the Window -> Lighting menu and bake from there. Bake Into Scene acts as normal geometry and is plug-in only functionality. This puts all of the lighting data into the main scene.

    The two loading strategies do not appear to work together nicely so you can't mix loading strategies in the same main scene.

    Also please remember to un-check "Auto" in the Lighting menu or your lightmaps will be stomped when you open the scenes again.
     
  23. damard

    damard

    Joined:
    Jul 22, 2015
    Posts:
    6
    Ok, thanks for the explanation, I had not seen anywhere that the bake functionality was only for load additive / async. I had problems maintaining the lightmaps when baking using the Window -> Lighting and bake. It did bake and show up correctly after, but when reopening the scene, it wouldnt display the lightmaps anymore (although the lightmap snapshot was still in there). I havent tried since we moved from 5.1.x to 5.2.1p3. I'll keep you posted! Thanks for the support !
     
  24. damard

    damard

    Joined:
    Jul 22, 2015
    Posts:
    6
    Just to be clear, should I bake from the "main" scene using Window -> Lighting, or should I open each scene and bake them individually?
     
  25. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    You should bake from the main scene.
     
  26. damard

    damard

    Joined:
    Jul 22, 2015
    Posts:
    6
    So, I still get that issue, if I bake from the main scene, using Lighting > Bake, the lightmaps are unloaded when loading the game or building it. As long as the scene remains in it's "original" state with the subscene gameobjects, it is fine, but when "merging" in the data (by building, playing in editor or by deleting the subscene components) , I don't know if the GUIDs change but the lightmaps aren't used anymore.
     
  27. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    Strange I tested that last night on 5.2.1f1. Send me a small test case project and I'll look into it tonight.
     
  28. ZannaU

    ZannaU

    Joined:
    Mar 24, 2013
    Posts:
    17
    Hi,

    I’ve recently upgraded to Unity 5.2.2 and when I load a sub-scene that contains UI text the color of the text is always black. If I play the UI scene directly the text is the correct color.

    I noticed the problem when I’m playing the game from the editor (on a Mac). If I deploy a build on iOS it works correctly.

    Did anyone else experience the same issue?

    Thanks for your help
     
  29. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    I haven't tested against 5.2.2, but did not see this issue with my most recent game released with 5.2.1f1. Just to double-check, are you using the latest version of the plug-in (v1.91)? Hopefully someone else can chime in who uses 5.2.2.

    I'm moving my main project over to 5.2.x and am about to deprecate support for 4.x in future releases. Hopefully this will mean we're more in tune with what's happening in 5.x but we also use NGUI in that project.
     
  30. ZannaU

    ZannaU

    Joined:
    Mar 24, 2013
    Posts:
    17
    Hi Jodon,

    Thanks for the reply.

    Yes I'm using the latest version 1.91 and I'm seeing the issue using the standard Unity UI (the one introduced in version 4.6 to be clear).
     
  31. Yakkafo

    Yakkafo

    Joined:
    Jan 25, 2014
    Posts:
    2
    Hi Jodon,
    We are using at the same time Advanced Additive Scenes and another plugin, Probuilder 2 (http://www.protoolsforunity3d.com/probuilder/). Probuilder 2 allows us to create "probuilder objects" then edit their meshes directly from the Unity editor.
    The thing is, when we edit a probuilder object owned by a subscene from its parent scene, then we lock this subscene, we get a "Break Refs" error. Starting this moment, the scenes get very, very messy (ghost objects, 3D models are shifted on play, etc...). Screenshots here: http://imgur.com/a/CSD3G

    We know you are not familiar with probuilder (are you?) but since this is a very annoying bug we would like to share it with you and the other devs.
    Thank you very much.
     
  32. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    I actually have bought that plug-in but have not had a chance to play with it. If you look in the Console window, it will tell you what the cross-scene reference is. The breaking cross-scene references is quite an old dialog, are you on a legacy version of AAS? In the latest plug-in, it should not even warn you, it should just save them... which is probably also incorrect in this case. I believe the problem is that ProBuilder probably is referencing an asset via a public member variable (and is therefore being serialized). The proper fix is to find that variable and add [System.NonSerialized] to it.

    Cheers.
     
  33. benblo

    benblo

    Joined:
    Aug 14, 2007
    Posts:
    469
    Just a shot in the dark: I wouldn't be surprised if ProBuilder created volatile objects (meshes etc) that are either editor-only or rebuilt on play, but either way not meant to be saved in scenes. I know we had similar problems with AAS and our procedural geometry.
    AAS is messing with hideFlags way too much IMO, which I am aware is an inherent problem due to the hackish nature of the plugin until proper built-in low-level multi-scene support is available.

    I haven't had time to evaluate MSE yet: can we offset additive scenes content when opening them? It's the biggest thing preventing me from switching from AAS to MSE, losing that would be a real pain to us. If MSE doesn't support it, do you think AAS still will?
     
  34. AaronZurawski

    AaronZurawski

    Joined:
    Feb 21, 2013
    Posts:
    4
    Yes, we are seeing an identical issue, but its only happening with one of our scenes. We are also on 5.2.2f1 Mac, and using UGUI. This issue started happening when we updated to AAS from 1.8e to 1.91 (reverting back to AAS 1.8e, fixes the issue). It also only occurs in Editor- it is not present in a standalone build.

    The Color property on the Text is set properly, but seems to be ignored. It also may be useful to note that the affected UI is not in a scene, but is instantiated into an AAS from a prefab. If I drag the prefab into an AAS, and then Apply changes, the color is restored. However, even though those changes are saved out, the color change does not persist, and instantiating that prefab causes the color to still be black.
     
  35. neildevine

    neildevine

    Joined:
    Aug 24, 2015
    Posts:
    12
    Hey there Jodon, couple of issues here (5.2.2p1 + AAS1.91), we were using bake into scene, and have switched to load additive for our subscenes. first of all we went from something like 15s to get the game running in the editor by pressing play to 1mn, stopping the game goes up to 1mn45s to get back in a state where you can work. FYI I noticed one of our plugins was doing some processing in OnPostprocessScene without checking if the game was running, since it is called for each subscene on play apparently it was doing stuff over and over again unnecessarily ( that brought our play time down from 5mn to 1mn ).

    Other problem, when stopping the game we get this error for each subscene. If after getting this error we save the scene it will corrupt our data.

    Code (CSharp):
    1. [Assert] Quaternion To Matrix conversion failed because input Quaternion is invalid {0.000000, 0.000000, -0.000000, 0.000000} l=0.000000
    2. 0. UnityEditor.EditorApplication.OpenSceneAdditive()
    3. 1. SubSceneEx.EditorLoad() at Assets/CodingJar/AdditiveScenes/Editor/SubSceneEx.cs:482
    4. 2. SubSceneLoadCallback.OnPlaymodeStateChanged() at Assets/CodingJar/AdditiveScenes/Editor/SubSceneLoadCallback.cs:116
    5. 3. UnityEditor.EditorApplication.Internal_PlaymodeStateChanged()
    6.  

    Neil
     
  36. damard

    damard

    Joined:
    Jul 22, 2015
    Posts:
    6
    Hey Jodon,
    Here is a simple repro case for the bug I mentionned before (lightmapping from the lighting panel; using AAS baked mode). Just bake the scene, save, reopen.
     

    Attached Files:

  37. EdGrooverGames

    EdGrooverGames

    Joined:
    Jan 23, 2015
    Posts:
    4
    Hey Jodon, my team REALLY wants to use AAS and we've been checking it out recently. However, even after only spending a very short time playing with it, we are finding MAJOR issues. Are these known issues that you're working on? We're currently using Unity 5.2.1f1 (personal) and AAS 1.91. All sub-scenes are baked / auto-load.

    1) Sub-scene creation bug: If you try to create a sub-scene by selecting more than one game object in the main scene, the save scene dialog opens once per selected game object. So, if I select four game objects, I will get four save scene windows (one after the other, not at the same time). If I save a scene each time it asks, naming the first Sub1, then Sub2 etc., when it's done what I end up with in my main scene is a sub scene called Sub4, which has a sub scene of its own called Sub3, which has a sub scene of its own called Sub2, which has a sub scene called Sub1. Inside of Sub1 is all four of the game objects that were selected and used to create the sub scene(s). We can work around this by only selecting one game object when creating a sub scene, then dragging all other objects into the sub scene after it's created. But it's still a huge bug that can bite us if we accidentally select more than one object when first creating a sub scene...

    2) Locked and unchanged sub-scenes are required to re-save: If I have a game object GO2 in my sub scene SubMap1, and GO2 references a game object in the main scene (we'll call the object in the main scene GO1), then every time I save the main scene AAS makes me unlock SubMap1 and re-save it (even though SubMap1 was locked and has not changed, and GO1 hasn't changed). The whole point of wanting to use AAS is so that one person can edit the main scene while someone else edits SubMap1. If making changes to the main scene is always going to force re-saving SubMap1, then that completely negates any value that AAS is giving us. Interestingly, if I put GO2 in one sub-scene, and GO1 in another sub-scene, then I don't see the problem. But I was still able to make a change (that didn't change SubMap1 or anything referenced by SubMap1) that for unknown reasons required me to unlock and save SubMap1... The whole "require locked sub-scene to be unlocked and re-saved" thing is a huge problem. If my sub-scene remains locked it should never need to be saved. The only exception to that rule would be if an object is moved from one scene to another scene (and the moved object is referenced by a locked scene), and even then the prompt should come up requiring you to unlock the locked scene at the time the object is moved (and it should not be moved if the developer chooses not to unlock the scene), not when you try to save the scene. Letting our developers accidentally destroy data is not an option, but having unchanged sub-scenes requiring to be re-saved for no reason is also not an option.

    3) Sub-scene compression always goes back to uncompressed: It seems that sub-scenes always default to saving uncompressed and the user must choose to re-compress manually each time any changes are made. In fact, all you have to do is unlock the sub-scene (but make no changes) and the sub-scene will be re-saved uncompressed. You say that compressed sub-scenes are easier to merge together, but if they're constantly re-saving themselves uncompressed then you end up with a good chance that you'll have one version of the file that is compressed trying to merge with a version of the file that isn't compressed. I imagine that would be impossible to merge. The compression setting should be set ONCE and every time the sub-scene is locked / saved it should use the setting automatically (either it should save compressed every time, or it should save uncompressed every time, but the developer shouldn't have to manually tell the sub-scene to compress over and over and over every time they work with it).

    4) Every time I compress sub-scenes, I get a bunch of cross-scene reference errors in the log. These errors don't show up when I save the main scene or sub-scenes, only when I try to compress the sub-scenes. These errors shouldn't be happening.

    5) Object reference becomes null: I created two new objects in the main scene. ObjA and ObjB. ObjA contains a reference to ObjB. I select ObjA and create a sub-scene from it. Then I drag ObjB into the new sub-scene and save, so ObjB is in the same sub-scene as ObjA. I then compress sub-scenes, and the ObjB ref in ObjA becomes null. As long as data is being destroyed, we can't use this plug-in. No matter which sub-scene each Obj is in, these refs should never become null, but it's extra worrying that they're in the same sub-scene yet the ref still becomes null for some reason.

    6) Odd behavior with cross-scene references. When I have a scene with multiple sub-scenes, and objects in the sub-scenes that reference objects in other sub-scenes, the references are inconsistent. Sometimes references show as "Cross-scene ref" and sometimes they show the correct object. I'm fine with the fact that they become "Cross-scene ref" in some situations, but it doesn't seem to be consistent. Sometimes when I unlock SubMap1, the refs inside become real refs and sometimes they don't. Sometimes when I unlock SubMap2, some refs inside SubMap1 become real refs and sometimes they don't. Sometimes when they become real refs when I unlock SubMap2, they don't go back to being "Cross-Scene Ref" when I lock SubMap2 again. While I haven't seen any real problems with this yet, it makes me expect that sometimes everything will work as it should and sometimes it won't. Maybe there's no bug here, but it FEELS broken and feels like it could lead to problems.

    Am I just doing something (or several things) wrong? Are these known issues that will be fixed? Also, what will change with AAS after the Dec. Unity update? The scene files are our single largest bottleneck right now, and we really want to use AAS to resolve that problem, but after playing with it so far there's no way we could rely on this plug-in for our project.
     
  38. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    FIRST OFF,

    Apologies to everyone as the forum is again messed up and doesn't e-mail me updates to this thread anymore. I'll catch-up on everyone's issues this week.

    I'll take a look at optimizations, but are you sure this isn't simply the switch to load them additively? When you bake, the data is never unloaded so it's quite quick to go into play mode. When you load level additively, that data needs to be nuked and reloaded through the Application.LoadLevelAdditive call.

    This is in Unity code, so I'm not entirely sure I can fix it. Best thing to do is to read the scene file and see if you can find the Quaternion that isn't normalized (0,0,0,0) and see if my plug-in is causing it or something else.
     
  39. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    I have not seen this in ages (since like 6+ months ago) and cannot reproduce it in my local projects. I'm not sure what would be causing this, but if you have a 100% repro case just send me a project.

    This will happen if you have just made a cross-scene reference. The reason is that cross-scene references must be recorded in both the source scene and the parent scene. So dragging from a scene requires it to unlock, there's no way around this at the moment.

    This is because Unity does not give us a way to save compressed scenes prior to 5.3. I'm still looking into this for Unity 5.3, but I don't think it's promising. If you never care about merging / diffing your scenes, then don't worry about the uncompressed scenes. I can perhaps put in a menu item to disable it.

    However, if you want to merge/diff, you need to have Unity resave it, which is what the "recompress" does (it opens and saves each scene individually). Again, this isn't something I can do I'm restricted to what Unity gives me.

    I'll look into this for the next update.

    This is a bug in the cross-scene references not updating when they get put into the same SubScene. When you first create your scene, that will create the cross-scene reference because they were not in the same SubScene when you saved (it saves when you first create the scene). Then when you move it, it'll create this bug. I'll look into it.

    The rules should be that if a scene is unlocked, you see the references. If it's locked, it will always be cross-scene references. If it's unlocked and you see a cross-scene reference this is definitely a bug and if you have a repro case I can fix it.

    The December update is tricky because it's probably going to fight with this system. I've slowly trying to keep up with 5.3 but there's breaking changes nearly every release. My current strategy is to split my plug-in into two: "pre-5.3/legacy" functionality and "post-5.3/multi-scene" functionality. I haven't figured out how much I'm going to support the legacy functionality which includes nested sub-scenes and baked sub-scenes. Unity has put a line in the sand saying no nested sub-scenes and only a single instance of a scene can be loaded at any one time. This puts me in a precarious position, but I'm working on it.
     
  40. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    Unfortunately, no you can't. I'm also thinking of ditching support for it when loading additively because there's no way to properly bake lighting for your scene in the offset scenario :(. Unity gives us just a single API call to bake your lighting with multiple scenes and it's going to assume your scenes live at the origin. If I find a work-around I'll let you know, but I've had warnings about this in my plug-in for a while.
     
  41. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    Hey Damard,

    I've just repro'd it. The simple work-around is to use Load Level Additive instead of Bake Into Scene. I understand that may be undesirable if you're trying to use cross-scene references. I *believe* this may be solved in 5.3 but unfortunately their latest release is broken and doesn't install correctly. I will put it on my list of things to check & support when the next version comes out. Are you planning on upgrading when 5.3 comes?

    Cheers.
     
  42. EdGrooverGames

    EdGrooverGames

    Joined:
    Jan 23, 2015
    Posts:
    4
    Okay, here's a test project to reproduce the bugs.

    1. Open TestScene1.unity. Select multiple objects, it happened when I did it with Cube and Cube (1) selected. I also reproduced it with Cube, Cube (1), Sphere and Capsule selected. In the first case it had me create two sub-scenes, in the second case it had me create 4 sub-scenes. Open TestScene1Result to see what I ended up with after selecting 4 objects and right clicking, selecting "Create Other" then selecting "Sub-Scene" then selecting "Create from Selected Game Objects".
    2. I can't create a simple repro case for this one right now, so it may just be when a cross-scene ref is created like you said, but it didn't seem like it at the time. I'll keep trying to find a repro that causes a locked scene to be unlocked without creating a new cross-ref. Even if it's only when you create a cross scene reference, this is still a big issue for us. If I can't link to anything in another sub-scene without unlocking that sub-scene, there's a lot of work that this system doesn't help us with at all. I don't understand why you would need to write to the scene file of a game object that is being linked to (it may be more work when only linking in one direction, but it should be doable and the payoff would be well worth the extra work). <probably need to create a unique ID for the lilnked objects I guess> If you can change your system so that's not required that would be huge for us, as is this may be a show stopper for us. One of the main things we want to be able to do is have an artist continue to update / change the level art while a mission designer is creating mission content in the same level. But missions must reference objects in the scene (to enable objects, disable objects, highlight objects, trigger some action on an object etc.) and this one issue would prevent much of our mission work while anyone else is working with the scene or any of it's sub-scenes... In fact, we can already do everything BUT set up references to scene objects for our missions without making scene changes (using prefabs), this is the main thing we were hoping your system would fix for us. In fact it's not limited to missions, in general our programmers often need to reference scene objects for their systems and it's a real bottleneck to have to kick others out of the scene file any time they need to hook something up.
    6. Open TestScene2.unity. In TestScene2_Sub1 you will find a game object called Cube. It has a link to Cube (1) in TestScene2_Sub2. When you open TestScene2, both sub-scenes should be locked and the ref in Cube will be "Cross-Scene Ref". Unlock TestScene2_Sub1, and the ref will become "Cube (1)". Unlock TestScene2_Sub2, and the ref is still "Cube (1)". Lock TestScene2_Sub2, and the ref becomes "Cross-Scene Ref". As you can see, sometimes when TestScene2_Sub2 is locked the ref is "Cross-Scene Ref" and sometimes it's not.
     
    Last edited: Nov 19, 2015
  43. EdGrooverGames

    EdGrooverGames

    Joined:
    Jan 23, 2015
    Posts:
    4
    We don't need nested sub-scenes, but we would want baked sub-scenes for sure. We need baked sub-scenes both for faster loading and because we need cross-scene references to work. At this point it seems we should probably wait until after 5.3 comes out then re-evaluate the situation after you've locked down what AAS will and won't do post 5.3.
     
  44. henkjan

    henkjan

    Joined:
    Aug 1, 2013
    Posts:
    122
    Hi Jodon,
    I've updated my project to Unity 5.2.3 and now AAS is not working anymore. (Sorry, I forgot the error but it had something to do with a function call you use and isn't allowed).
     
  45. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    Still looking into it. Unfortunately their scene-merge functionality doesn't work properly yet... I'm starting to log bugs and hopefully they'll get it fixed in time.

    I'll take a look soon, but I'd suggest either using the source code to fix the issue or downgrading until it's resolved (in a few weeks).
     
  46. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    Case #1 I can't reproduce at all. I haven't even imported a newer version of AAS, I'm using exactly what you've included that bug doesn't happen. I can't possibly think of a scenario where this would occur as the code just doesn't even loop, it's executed only a single pass. Maybe it's a bug in your specific version of Unity? I've been using 5.2.3f1 to test now.

    Case #2 is more complex, and yes it's unlocking both scenes because there needs to be a UniqueID linking both objects. The problem is that Unity can re-assign the IDs of objects at any time, so we need our own IDs which don't change. This may be alleviated in Unity 5.3 but I'm not holding my breath, I'm predicting too many bugs in the initial 5.3.0 release and I suggest holding off upgrading until at least 5.3.1 or 5.3.2 (as we saw with the 5.2.0 release). The cross-scene referencing wasn't really designed to encourage lots of links between scenes -- I still discourage their use. Instead events should be used and I've been working on a system that makes this easier to visualize (drag 'n drop) but it won't be ready for release until Christmas. AAS customers will of course get this system for free.

    Case #6 was indeed an oversight/bug and I have fixed it tonight. If you need an early copy e-mail me and I'll send it. I'm about to submit it to the asset store hopefully in time for "Cyber Monday".
     
  47. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    I've been working in 5.2.3 trying to update the plug-in all night and haven't seen an issue. Please let me know what the error is. Is it possible you are coming from 5.1.x and didn't update your package from the asset store?
     
  48. JoeMcT17

    JoeMcT17

    Joined:
    Oct 6, 2015
    Posts:
    2
    Hi Jodon,

    I've been checking out your plugin and so far it seems great and will provide us with everything we will need.
    I do seem to be having a problem though. Would you expect nested scenes to work in Unity 5.2.1 and 5.2.2 with version 1.91 of AAS? They work fine in editor but when I make a build (testing on PC) the nested scene doesn't seem to load.

    Thanks,
    Joe
     
  49. henkjan

    henkjan

    Joined:
    Aug 1, 2013
    Posts:
    122
    I've reimported AAS to my project and it runs without the error I first got! But, I saw a problem comming back I thought it had something to do with Unity 5.2.2 but looks like it's because of AAS:
    http://forum.unity3d.com/threads/unity-5-2-2-wrong-ui-text-color-all-black.365875/
     
  50. Jodon

    Jodon

    Joined:
    Sep 12, 2010
    Posts:
    419
    This is fixed in 1.92, but you can send me an e-mail and I'll send it to you earlier if it's urgent. Also helps to have more eyes on the new builds when they go out. My e-mail is in the Documentation.txt file.