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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
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.