Doloro GDK 22 .1.0 Beta
by Tauri Interactive
Doloro.DataManagement.DynamicResources.ResourcesCollection Class Reference

Detailed Description

A class that contains catalog of resources gathered by the ResourcesManager handlers.

The collection implemented to be used as register-like buffer for Dynamic Resource System. It generated during search process and gather loaded catalogs of assets to provide fast loading result

The collection contains the structure of bunch UnityEngine.Object elements.

Collection can't be modified after creation due to the purpose and safety issues.

Inheritance diagram for Doloro.DataManagement.DynamicResources.ResourcesCollection:
Collaboration diagram for Doloro.DataManagement.DynamicResources.ResourcesCollection:

Classes

class  AssetBundlesResourcesCollection
 Class that handles assets collections. Guarantees the same order of resources then was during loading. More...
 

Public Member Functions

 ResourcesCollection (string key)
 Creates collection and bonds it to the async resources loader. Use AssetBundleHandler to loading of resources into collection. More...
 
 ResourcesCollection (string key, params AssetBundleDescriptor[] bundles)
 Loading asset bundles content to the collection. More...
 
 ResourcesCollection (string key, UnityEngine.Object[] localResources)
 Gathers the data to collection. More...
 
 ResourcesCollection (string key, ResourcesCollection source, params IResourceFilter[] filters)
 Creating partial collection based on the different one. More...
 
virtual void Add (ResourceContainer item)
 Not supported due to safety issues as well architectural solutions. The ResourcesCollection is array-like collection with a solid structure of elements. More...
 
virtual bool Contains (ResourceContainer item)
 Looking for element among collection items. More...
 
virtual void CopyTo (ResourceContainer[] array, int arrayIndex)
 Copies all the elements of the current one-dimensional array to the specified one-dimensional array. More...
 
virtual bool Remove (ResourceContainer item)
 Not supported due to safety issues as well architectural solutions. The ResourcesCollection is array-like collection with a solid structure of elements. More...
 
void Clear ()
 Clearing all the object from collection.
 
IEnumerator< ResourceContainerGetEnumerator ()
 Returns enumerator of the resource containers at the collection. More...
 
ResourceContainer[] GetBundleContent (string bundleKey)
 Returns content related to the asset bundle. More...
 
ResourceContainer[] GetBundleContent (int bundleIndex)
 Returns content of the bundle by the bundle index. More...
 

Static Public Attributes

const string LocalResourcesBundleKey = "."
 Bundle Key related to the local resources.
 

Protected Member Functions

virtual void AssetBundleContentHandler (AssetBundle bundle, UnityEngine.Object[] loadedObjects)
 Adding bundles content to the table of loaded resources. More...
 

Protected Attributes

AssetBundlesResourcesCollection ResourcesTable = new AssetBundlesResourcesCollection()
 The table that contains all the loaded resource arrays in format. BundleSign -> Object[] '.' as bundle sign means that this is local asset from build-time bundle.
 

Properties

virtual string Key [get]
 The key that was defined during initialization time. More...
 
virtual ResourceContainer this[int index] [get, set]
 Returns ResourceContainer by index. More...
 
virtual ResourceContainer[] this[string bundleKey] [get]
 Returns resources related to the bundle. More...
 
int Count [get]
 Count of elements in collection.
 
Action< AssetBundle, UnityEngine.Object[]> AssetBundleHandler [get, set]
 Handler that update collections content with the asset bundle resources.
 
object[] ResgisteredBundleKeys [get]
 Return the collection of asset bundle names. The values stored as string. '.' means local resources bundle.
 
IResourceFilter[] AppliedFilters [get, set]
 Filters applied to the collection. More...
 
bool IsReadOnly [get]
 The collection can be modified after creation.
 

Constructor & Destructor Documentation

◆ ResourcesCollection() [1/4]

Doloro.DataManagement.DynamicResources.ResourcesCollection.ResourcesCollection ( string  key)

Creates collection and bonds it to the async resources loader. Use AssetBundleHandler to loading of resources into collection.

Parameters
keyRegistration key.

◆ ResourcesCollection() [2/4]

Doloro.DataManagement.DynamicResources.ResourcesCollection.ResourcesCollection ( string  key,
params AssetBundleDescriptor[]  bundles 
)

Loading asset bundles content to the collection.

Parameters
keyRegistration key.
bundlesArray of data gathered from bundles.

◆ ResourcesCollection() [3/4]

Doloro.DataManagement.DynamicResources.ResourcesCollection.ResourcesCollection ( string  key,
UnityEngine.Object[]  localResources 
)

Gathers the data to collection.

Parameters
keyRegistration key.
localResourcesResources loaded from the build-in package. Skipping adding in case of null or 0 length.

◆ ResourcesCollection() [4/4]

Doloro.DataManagement.DynamicResources.ResourcesCollection.ResourcesCollection ( string  key,
ResourcesCollection  source,
params IResourceFilter[]  filters 
)

Creating partial collection based on the different one.

Parameters
keyRegistration key.
sourceSource collection.
filtersBunch of filter rules for elements selection.

Member Function Documentation

◆ Add()

virtual void Doloro.DataManagement.DynamicResources.ResourcesCollection.Add ( ResourceContainer  item)
virtual

Not supported due to safety issues as well architectural solutions. The ResourcesCollection is array-like collection with a solid structure of elements.

Exceptions
NotSupportedExceptionAny time.

◆ AssetBundleContentHandler()

virtual void Doloro.DataManagement.DynamicResources.ResourcesCollection.AssetBundleContentHandler ( AssetBundle  bundle,
UnityEngine.Object[]  loadedObjects 
)
protectedvirtual

Adding bundles content to the table of loaded resources.

Parameters
bundleSource bundle. Non null.
loadedObjectsNon null and with Length greater than 0. Array with objects loaded by AssetBundleRequest.

◆ Contains()

virtual bool Doloro.DataManagement.DynamicResources.ResourcesCollection.Contains ( ResourceContainer  item)
virtual

Looking for element among collection items.

Parameters
itemTarget item.
Returns
Result of search.

◆ CopyTo()

virtual void Doloro.DataManagement.DynamicResources.ResourcesCollection.CopyTo ( ResourceContainer[]  array,
int  arrayIndex 
)
virtual

Copies all the elements of the current one-dimensional array to the specified one-dimensional array.

Parameters
arrayTarget array.
arrayIndexTarget array start index.

◆ GetBundleContent() [1/2]

ResourceContainer[] Doloro.DataManagement.DynamicResources.ResourcesCollection.GetBundleContent ( int  bundleIndex)

Returns content of the bundle by the bundle index.

Parameters
bundleIndexIndex of the bundle into the collection.
Returns
Collection of assets.

◆ GetBundleContent() [2/2]

ResourceContainer[] Doloro.DataManagement.DynamicResources.ResourcesCollection.GetBundleContent ( string  bundleKey)

Returns content related to the asset bundle.

Parameters
bundleKeyKey related to the bundle.
Returns
Collection of assets.
See also
LocalResourcesBundleKey

◆ GetEnumerator()

IEnumerator< ResourceContainer > Doloro.DataManagement.DynamicResources.ResourcesCollection.GetEnumerator ( )

Returns enumerator of the resource containers at the collection.

Returns
Instance of the enumerator.

◆ Remove()

virtual bool Doloro.DataManagement.DynamicResources.ResourcesCollection.Remove ( ResourceContainer  item)
virtual

Not supported due to safety issues as well architectural solutions. The ResourcesCollection is array-like collection with a solid structure of elements.

Exceptions
NotSupportedExceptionAny time.

Property Documentation

◆ AppliedFilters

IResourceFilter [] Doloro.DataManagement.DynamicResources.ResourcesCollection.AppliedFilters
getset

Filters applied to the collection.

Never is null.

◆ Key

virtual string Doloro.DataManagement.DynamicResources.ResourcesCollection.Key
get

The key that was defined during initialization time.

The same key using during registration of collection into the ResourcesManager handlers.

◆ this[int index]

virtual ResourceContainer Doloro.DataManagement.DynamicResources.ResourcesCollection.this[int index]
getset

Returns ResourceContainer by index.

Parameters
indexIndex of the object.
Returns
Reference to object in collection.
Exceptions
IndexOutOfRangeExceptionInvalid index out of bounds [0;Count).

◆ this[string bundleKey]

virtual ResourceContainer [] Doloro.DataManagement.DynamicResources.ResourcesCollection.this[string bundleKey]
get

Returns resources related to the bundle.

Parameters
bundleKeyBundle signature key. Normally in string format.
Returns
Reference to the ResourceContainer[] if found.

The documentation for this class was generated from the following file: