Steps to reproduce:
1. Open the attached user's project "SavingRemovesAssetBundle.zip" and open the "SampleScene" located in "Assets/Scenes"
2. Open the Asset Bundle Browser tool located at "Windows -> AssetBundle Browser"
3. Select "SampleScene" in the project view
4. In the "SampleScene" Inspector, click the AssetBundle dropdown, create a new bundle and add "SampleScene" to it
5. Navigate to the AssetBundle Browser and click the Refresh button in the top left. Now note that the bundle you created is listed, and if clicked on, "SampleScene" is listed in the bundle
6. In the open scenes Hierarchy, right-click the root of the scene and select the "Save Scene" option
7. After the save has finished, click on "SampleScene" in the Project view and note that the Asset Bundle section of its Inspector has been returned to "None"
8. Navigate to the AssetBundle Browser and click the refresh button. Note that the SampleScene is no longer inside the bundle
Expected results: You can edit and save the scene and it shall remain inside the asset bundle it is assigned to
Actual results: If you save the open scene, then it shall remove itself from the assigned asset bundle, requiring the user to manually add the scene back to the said bundle
Reproducible on: 2022.1.0a1, 2022.2.2f1, 2023.1.0a20
Not reproducible on: 2020.3.44f1, 2021.3.17f1, 2022.1.24f1, 2023.1.0a21, 2022.2.3f1, 2023.1.0a25
Notes:
- You can find a video attached (BugReproduction.mov) to this report showing the reproduction of the issue.
- In 2023.1 this warning is outputted in the Console Window:
Importer(DefaultImporter) generated inconsistent result for asset(guid:9fc0d4010bbf28b4594072e72b8655ab) "Assets/Scenes/SampleScene.unity"
UnityEditor.GenericMenu:CatchMenu (object,string[],int)