Example #1
0
 public IObservable <T[]> LoadAllAssets <T>()
 {
     return((_isDisposed
         ? Observable.Throw <T[]>(
                 new InvalidOperationException("The bundle is disposed. Cannot LoadAllAssets from it."))
         : _bundle.LoadAllAssets <T>())
            .Finally(Dispose));
 }
Example #2
0
        public virtual T[] LoadAllAssets <T>(string bundleName) where T : Object
        {
            if (bundleName == null)
            {
                throw new System.ArgumentNullException("bundleName");
            }

            using (IBundle bundle = this.GetBundle(bundleName))
            {
                if (bundle == null)
                {
                    return(null);
                }
                return(bundle.LoadAllAssets <T>());
            }
        }
Example #3
0
        public virtual Object[] LoadAllAssets(string bundleName, System.Type type)
        {
            if (bundleName == null)
            {
                throw new System.ArgumentNullException("bundleName");
            }

            if (type == null)
            {
                throw new System.ArgumentNullException("type");
            }

            using (IBundle bundle = this.GetBundle(bundleName))
            {
                if (bundle == null)
                {
                    return(null);
                }
                return(bundle.LoadAllAssets(type));
            }
        }