Search Issue Tracker
By Design
By Design in 2023.2.X
Votes
1
Found in
2020.3.47f1
2021.3.22f1
2022.2.15f1
2023.1.0b11
2023.2.0a10
Issue ID
UUM-34124
Regression
No
Class member becomes null when loading the first addressable scene
Reproduction steps:
1. Open the attached project “AddresablesRepro“
2. Open “Assets/Scenes/main_1.unity“ Scene
3. Enter Play mode
4. After the “main_1” Scene loads, click the button labeled “Button“ to load the “main_2” Scene
Expected result: The “main_2” Scene should load
Actual result: An "Assertion failed" exception appears, stating "Callback is null"
Reproducible with: 2020.3.47f1, 2021.3.22f1, 2022.2.15f1, 2023.1.0b11, 2023.2.0a10
Reproducible on: Intel MacOS Venture 13.1
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on CollectAllSceneManagerAndObjectIDs when opening a specific Scene
- GPU device suspended error when replaying a video in the Video Player with NVIDIA Vertical Sync set to Fast
- GPU device suspended error when replaying a video in the Video Player with NVIDIA Vertical Sync set to Fast
- SetComponentEnabled uses class instead of struct when constraining Enableable Component type
- [iOS] Application.deepLinkActivated does not get invoked while app is running when UIApplicationSceneManifest is added in Info.plist
Resolution Note:
As designed. The scenes reference different copies of the ScriptableObject. The first scene (init) is non-addressable and initializes a copy of the ScriptableObject (LOAD_SCENE_ADDRESSABLE) from the built-in scene data. The second scene (main_1) is addressable and references a copy of the ScriptableObject from the AssetBundle. This object is not initialized, and so its callback is null. To make both scenes reference the same object from the AssetBundle, make either the first scene (init) or the ScriptableObject addressable and load them as needed.
Resolution Note (2023.2.X):
As designed. The scenes reference different copies of the ScriptableObject. The first scene (init) is non-addressable and initializes a copy of the ScriptableObject (LOAD_SCENE_ADDRESSABLE) from the built-in scene data. The second scene (main_1) is addressable and references a copy of the ScriptableObject from the AssetBundle. This object is not initialized, and so its callback is null. To make both scenes reference the same object from the AssetBundle, make either the first scene (init) or the ScriptableObject addressable and load them as needed.