Created
November 18, 2019 22:35
-
-
Save Badgerdox/719176022b2ab9688f438f5d51893da3 to your computer and use it in GitHub Desktop.
CreatedAssets #4
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 class CreatedAssets : MonoBehaviour | |
{ | |
[SerializeField] private List<string> _labels = new List<string>(); | |
[SerializeField] private List<GameObject> Assets { get; } = new List<GameObject>(); | |
private void Start() | |
{ | |
CreateAndWaitUntilCompleted(); | |
} | |
private async Task CreateAndWaitUntilCompleted() | |
{ | |
await CreateAddressablesLoader.SearchByLabels(_labels, true, Assets); | |
foreach (var asset in Assets) | |
{ | |
//Asset is now loaded perform additional operations | |
Debug.Log(asset.name); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment