Created
November 18, 2019 04:02
-
-
Save Badgerdox/c1cea8269dda49c3e3df86052769380c to your computer and use it in GitHub Desktop.
CreateAddressablesLoader #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class CreateAddressablesLoader | |
{ | |
public static async Task ByAddress<T>(string label, List<T> createdAssets) where T : Object | |
{ | |
var tempLocations = new List<IResourceLocation>(); | |
await AddressableLocationLoader.GetAll(label, tempLocations); | |
foreach (var location in tempLocations) | |
{ | |
var obj = await Addressables.InstantiateAsync(location).Task as T; | |
createdAssets.Add(obj); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment