Created
November 18, 2019 06:28
-
-
Save Badgerdox/cd098b47f5ad4b1f76fa714e129ead17 to your computer and use it in GitHub Desktop.
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 async Task ByName<T>(string label, string name, List<T> createdObjs) | |
where T : Object | |
{ | |
var locations = await Addressables.LoadResourceLocationsAsync(name).Task; | |
foreach (var location in locations) | |
{ | |
if (!location.PrimaryKey.Contains(name)) break; | |
createdObjs.Add(await Addressables.InstantiateAsync(name).Task as T); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment