private static IEnumerator InstantiateAllCore <T>( object key, IObserver <IList <T> > observer, CancellationToken token, Transform parent = null, Action <IAsyncOperation <T> > onSingleCompleted = null, Action <IAsyncOperation <IList <T> > > onCompleted = null) where T : UnityEngine.Object { var aop = Addressables.InstantiateAll <T>(key, onSingleCompleted, parent); if (onCompleted != null) { aop.Completed += onCompleted; } while (!aop.IsDone && !token.IsCancellationRequested) { yield return(null); } if (token.IsCancellationRequested) { yield break; } observer.OnNext(aop.Result); observer.OnCompleted(); }
public IAsyncOperation <IList <GameObject> > InstantiateAll(object key, Action <IAsyncOperation <GameObject> > callback, Transform parent = null, bool instantiateInWorldSpace = false) { return(Addressables.InstantiateAll(key, callback, parent, instantiateInWorldSpace)); }
public IAsyncOperation <IList <GameObject> > InstantiateAll(object key, Action <IAsyncOperation <GameObject> > callback, InstantiationParameters instantiateParameters) { return(Addressables.InstantiateAll(key, callback, instantiateParameters)); }