Created
November 18, 2019 02:26
-
-
Save Badgerdox/e76923e070a4caaaae72db99a62ad75b to your computer and use it in GitHub Desktop.
CreateAddressablesLoader #1
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 ByLoadedAddress<T>(IList<IResourceLocation> loadedLocations, List<T> createdObjs) | |
where T : Object | |
{ | |
foreach (var location in loadedLocations) | |
{ | |
var obj = await Addressables.InstantiateAsync(location).Task as T; | |
createdObjs.Add(obj); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment