Last active
November 18, 2019 17:00
-
-
Save Badgerdox/291581bc30685738814f92d44100aa26 to your computer and use it in GitHub Desktop.
Create By Name
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 string _label; | |
[SerializeField] private string _assetName; | |
private List<GameObject> Assets { get; } = new List<GameObject>(); | |
private void Start() | |
{ | |
CreateAndWaitUntilCompleted(); | |
} | |
private async Task CreateAndWaitUntilCompleted() | |
{ | |
await CreateAddressablesLoader.ByName(_assetName, Assets); | |
foreach (var asset in Assets) | |
{ | |
//OBJS LOADED PERFORM ADDITIONAL ACTIONS | |
Debug.Log(asset.name); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment