Search Issue Tracker
Won't Fix
Votes
0
Found in [Package]
1.11.2
Issue ID
ADDR-1946
Regression
Yes
Exceptions are not caught with try-catch block when using AssetReference.LoadSceneAsync with invalid Scene
How to reproduce:
1. Open the attached project's "case_1322452-Project.zip" Scene labeled "SampleScene"
2. Enter the Play Mode
3. Inspect the Console Window
Expected result: Exceptions are caught
Actual result: Exceptions are not caught
Reproducible with: 1.11.2, 1.17.17 (2018.4.34f1, 2019.4.24f1, 2020.3.7f1, 2021.1.6f1, 2021.2.0a15)
Not reproducible with: 1.10.0 (2018.4.34f1, 2019.4.24f1, 2020.3.7f1, 2021.1.6f1, 2021.2.0a15)
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
- Fix for 2022.3.X: Flickering of HDRP Directional Light shadows with DirectionalMixedCachedShadows when in an Entities Graphics rendered Subscene
- "Objects are trying to be loaded during a domain backup." errors on entering Playmode
- Transform Node does not have outputs when it is created
- Changing the Default Icon does not change the executable's icon when re-building the project
- Texture is stored upside down when using Blit
Resolution Note:
Because this is an async operation, by the time an exception is hit, it likely cannot be passed up to the calling code. As such, we never attempt to pass it up, but instead catch the exception ourselves and log it. So two notes.
1. Exceptions are indeed caught, they're just also logged, which could make them appear as "not caught"
2. If a user wishes to actively process exceptions, they should do so via the ResourceManager.ExceptionHandler as outlined here https://docs.unity3d.com/Packages/com.unity.addressables@1.17/manual/ExceptionHandler.html