Пример #1
0
        private void GatherAssetsForFolder(AddressableAssetEntry entry, AddressableAssetsBuildContext aaContext)
        {
            var allEntries = new List <AddressableAssetEntry>();

            entry.GatherAllAssets(allEntries, false, true, false);
            foreach (var e in allEntries)
            {
                e.CreateCatalogEntries(aaContext.locations, false, typeof(AssetDatabaseProvider).FullName, null, null, aaContext.providerTypes);
            }
        }
 void AddAndRecurseEntriesBuild(AddressableAssetEntry entry, AssetEntryTreeViewItem parent, int depth)
 {
     var item = new AssetEntryTreeViewItem(entry, depth);
     parent.AddChild(item);
     var subAssets = new List<AddressableAssetEntry>();
     entry.GatherAllAssets(subAssets, false, false, true);
     if (subAssets.Count > 0)
     {
         foreach (var e in subAssets)
         {
             AddAndRecurseEntriesBuild(e, item, depth + 1);
         }
     }
 }
        private void GatherAssetsForFolder(AddressableAssetEntry entry, AddressableAssetsBuildContext aaContext)
        {
            var allEntries = new List <AddressableAssetEntry>();

            entry.GatherAllAssets(allEntries, false, true, true);
            foreach (var e in allEntries)
            {
                var type = e.MainAssetType;

                if (type == typeof(SpriteAtlas))
                {
                    e.CreateCatalogEntries(aaContext.locations, false, typeof(AssetDatabaseProvider).FullName, null, null, aaContext.providerTypes);
                }
                else
                {
                    if (e.IsScene)
                    {
                        type = typeof(SceneInstance);
                    }
                    aaContext.locations.Add(new ContentCatalogDataEntry(type, e.AssetPath, typeof(AssetDatabaseProvider).FullName, e.CreateKeyList()));
                }
            }
        }