Doloro GDK 22 .1.0 Beta
by Tauri Interactive
|
Lower level powerfull API the provides you full control over entire module resources management backstage.
Explore API: Doloro.DataManagement.DynamicResources.ResourcesManager
ResorucesCollection
is a one of the main operating types of the API.
Stores a set of resources related to certain search query or a key defined by user.
See also: Doloro.DataManagement.DynamicResources.ResourcesCollection
ResourceContainer
is a container sharing via ResorucesCollection
instances that works like a proxy for destination resource.
To addition the container provides with a meta data about the resource search conditions and reference to searched members that been a part of the search operation and mostly expected to be used.
See also:
Resource filters is an important part of a search engine integrated to the ResourcesManager
.
Filters are programable entities those supply the engine with conditional logic that selects resources among sets.
Explore API: Doloro.DataManagement.DynamicResources.Search.IResourceFilter
The entire from-box filters located at the Doloro.DataManagement.DynamicResources.Search
namespace.
Filter | Purpose |
---|---|
ResourceTypeFilter | Encapsulates common query logic for components filtering. Allows to filter resources which contains Component of certain type. |
SignatureFilter | Selects resources by its signature properties. |
TagsAbsenceFilter | Selects resources with ITagsCollection implementing Component with absent collection of tags. |
TagsDefinitionFilter | Selects resources with ITagsCollection implementing Component with exists collection of tags. |
To create a new filter, it's enough to create a runtime class implements the IResourceFilter
interface.
Since filters are not some plug-ins but a simple source, you no need to do anything to integrate them to the environment.
The module provides you with several filters you may use as example:
Use as example:
You may find the ResourceTypeFilter
as a good base logic for most of your tasks.
It has final filter implementation that left you only override the bool ResourceFilter(object, out UnityEngine.Object)
handler.
Base resource filter type encapsulates common Query logic for components filtering.
Has implementation for most of components related logic and left you just overriding of OnResourceFilter
handler with a custom selection logic focused on your needs.
Entire search results by default saves to search engine cache that allows.
That allows to engine instantly return the same resources in next time when you are querying the same request.
Also in some cases the engine can optimize a search using for you queries already searched more general collections that safes a lot of time.
The queries itself built from programable objects supplied with filters.
During search the engine interprets each filter to string representation that using like its signature.
You may assembly the same signature to access to the cached queried results by using following members:
For this just set to it the same arguments which been used during query via a ResourcesManager.FindAllResourcesAsync
handler.
You may force some ResourcesCollection
to set as a query result overriding all the next searches.
For this:
ResourceCollection
.key
you expecting to use as the query signature if you want to override a query results. ResourcesManager.ForceCollectionToCache
API method.Now the collection will be available by its ResourcesCollecction.key
via the ResourcesManager.FindCached
API method at any time, until it's dropped with the ResourcesManager.DropRegisteredCollection()
.