You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We were hoping to find a replacement for resources.loadall method, and bumped into a LoadWithSubAssets method, but there is an issue with it in the code snippet bellow,So it searches for Sprites, but finds Texture2D, So no results are type compatible, and the only reason it works is that the default value(which is not changed) of found index is 0, or the first element is returned.
Also while we are discussing this method is there a way to do LoadWithSubAssets, that loads multiple prefabs/scriptable objects from a subdirectory, we are currently working with GetAllAssetNames(), method and parsing the string to check for subdirectories.
The text was updated successfully, but these errors were encountered:
we are trying to load multiple assets inside of a subdirectory of a bundle. Like we would use Resources.LoadAll("Images/Specia/3l").
So we are trying to load all of the assets in that folder.
but while doing it we tried to write our own method. using Bundle.GetAllAssetNames(), and parse the names to fit our directory needs.
So while doing all of this we bumped into an issue with quoted method up there.
foundIndex is zero.
If no object with appropriate type is found it remains zero.
returned object from method is the first element of the assets array.
Hi there,
We were hoping to find a replacement for resources.loadall method, and bumped into a LoadWithSubAssets method, but there is an issue with it in the code snippet bellow,So it searches for Sprites, but finds Texture2D, So no results are type compatible, and the only reason it works is that the default value(which is not changed) of found index is 0, or the first element is returned.
Locus-Bundle-System/Runtime/EditorAssetMap.cs
Lines 63 to 82 in bc8d911
Also while we are discussing this method is there a way to do LoadWithSubAssets, that loads multiple prefabs/scriptable objects from a subdirectory, we are currently working with GetAllAssetNames(), method and parsing the string to check for subdirectories.
The text was updated successfully, but these errors were encountered: