Search Issue Tracker
By Design
Votes
0
Found in
5.5.0f3
Issue ID
858737
Regression
No
Resource.LoadAsync("") doesn't load all GameObjects from the Resource folder
Reproduction steps:
1. Open my attached project
2. Open the "scene" scene
3. Enter Play mode
Expected: under GameObject -> "Script" component all GameObjects residing in the resource folder should be listed.
Actual: Console throws a null reference exception
Note, if you open up the "Script" and change Resource.LoadAsync("") to Resource.LoadAsync("Cube"), it will add that GameObject to the list.
Reproducible on: 5.3.7p1, 5.4.3p3, 5.5.0f3, 5.6.0a6
-
NuShrike
Aug 27, 2022 16:07
This is still happening in Unity 2021.3.3f1. Resources.LoadAsync<T>("") always returns null even though there are assets in the Resources directory that has the object-type being sought.
Meanwhile, giving a non-null path such as the specific asset file's name, then properly returns the object-type sought.
-
Ladace
Dec 29, 2019 03:15
And the latest doc still claims if you pass a "" parameter you load everything in Resources folder. https://docs.unity3d.com/ScriptReference/Resources.LoadAsync.html
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
- [Linux] Top left corner of the screen is unresponsive when the Editor recompiles
- [Android] [Vulkan] Cubes stuck on the first few frames of rotation and application flickering when an Overlay Camera is added to the Camera Stack with MSAA enabled
- Profiling information icon does not update for Light Mode
- [Linux] Type to select functionality is missing for drop down menus
- TextMeshPro calculates Width Compression incorrectly when using certain values in the WD% field
Resolution Note (5.6.0f3):
The behaviour of returning null on Resources.LoadAsync("") is as intended.