Skip to content

Instantly share code, notes, and snippets.

@Badgerdox
Last active November 18, 2019 17:00
Show Gist options
  • Save Badgerdox/291581bc30685738814f92d44100aa26 to your computer and use it in GitHub Desktop.
Save Badgerdox/291581bc30685738814f92d44100aa26 to your computer and use it in GitHub Desktop.
Create By Name
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