Search Issue Tracker
Asset is not found when instantiating it when it was loaded using "Resources.Load() as GameObject" and 2 same name Assets exist
How to reproduce:
1. Open the attached "1301355_Repro" project
2. Open the Scene "SampleScene"
3. Enter the Play Mode
Expected results: No errors are thrown, a cube is instantiated in the Scene
Actual results: The "ArgumentException: The Object you want to instantiate is null." error is thrown, the cube is not instantiated in the Scene
Reproducible with: 2020.2.0a5, 2020.2.1f1, 2021.1.0b1
Not reproducible with: 2018.4.30f1, 2019.4.17f1, 2020.1.17f1, 2020.2.0a4
- The issue is reproducible when using this syntax:
Resources.Load("Cube") as GameObject;
- The issue is not reproducible when using these syntaxes:
Resources.Load("Cube", typeof(GameObject)) as GameObject;
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Baked Lightmaps preview is faded than in the Preview window
- [2D] Sorting Layer Order in Layer key resets to 0 in Animation window and in Inspector.
- [iOS] UIToolkit Border Renders Incorrectly
- deadlock in AssetDatabase_AcceleratorClient_Scheduling.ScheduledRequest_Status_InProgress
- Texture Compression settings on Android and WebGL Platforms are reset to default when building the project using a script