I want to initialize my game by this way:
Load Custom Container Data File (like “ResourceContainer” which is ScriptableObject, and set “preload” tag) → Use Linq to remap AssetReference by its key → Load AssetReference if necessary
My Resource Container Class can put lot of AssetReference so I have to divided container by name or group.
However, when I used “Addressables.LoadResourceLocationsAsync” to get IResourceLocation, I don’t know how to search container file. Sounds like IResourceLocation does not apply way to query by its name or group.
public void LoadInitializeData() {
var loader = Addressables.LoadResourceLocationsAsync(LOADING_INITIALIZE_TAG);
loader.Completed += OnInitializeDataLoaded;
}
private void OnInitializeDataLoading() {
}
private void OnInitializeDataLoaded(AsyncOperationHandle<IList<IResourceLocation>> op) {
if (op.Status == AsyncOperationStatus.Failed) {
// Load Failure
_initializeStatus = LoadingStatus.Failure;
}
var resourceLocations = new List<IResourceLocation>(op.Result);
// I don't know how to query by name or group of AssetReference
}
Is there any way to do?