Doloro GDK 22 .1.0 Beta
by Tauri Interactive
|
The static API that provides you control over cached collection of resources.
Explore API: Doloro.DataManagement.DynamicResources.Modules.TagsTool.CategorizedTagsDatabase
CategorizedTagsDatabase.CategorizeCacheableDynamicResources
CategorizedTagsDatabase.CategorizeCacheablePrefabAssets
CategorizedTagsDatabase.CategorizeCacheableAssets
As soon as the backstage processes going under the database hood is asynchronically at takes a time (depends on a size of resources catalog) you may find it useful to track the stage database currently on.
For this you should use following members of CategorizedTagsDatabase
:
Member | Description |
---|---|
CategorizationState | Provides precise step of categorization process. |
CategorizationInprogress | Indicates is the database currently under processing and can't be accessed. |
CategorizationProcessLog | Provides you with backstage logs that can be used to visualize loading state. |
Also you may find useful following next events:
Event | Occasion |
---|---|
onCategorizationFinished | Occurs when the CategorizationProcessLog value has been updated. |
onCategorizationFinished | Occurs when categorization process is finished. |
When catagoriazation has been finished you can access collection of objects related to tags with enabled caching.
For this you need to use one of the following API method:
Member | Operation |
---|---|
GetResources(params Tag[] tags) | Return intersection of cashed resources those have entire tags as defined. At leas one of the tag must has isCached property as one, otherwise an output collection will be empty. |
GetResources(Tag tag) | Searching resources for a certain cached Tag . |
GetResources(string tagKey) | Searching resources for a certain cached Tag by its key . |
All of the methods return ICollection<UnityEngine.Object>
as result, where object is a resources derived from UnityEngine.Object
and implemented ITagsCollection
interface.
*DynamicResources
instances at common cases, but could be different in case of custom solutions provided with your source or modules providers.
The static API class that allows to handle backstage operations with project located Tags Database assets.
Explore API:
TagsDatabase
assets have to be loaded.
All the main internal systems of framework use as tags provider a merged copy of entire TagsDatabase
assets found within the project.
That access provided via the TagsDatabaseUtils.MergedDatabase
property.
Read more about databases merge process: Merge
The merged database by itself is a static database the not following updates of sources used within.
In case you need to update this reflection due to some changes in origin, you have to call the database drop via TagsDatabaseUtils.DropMergedDatabase()
handler.
After this, during a next call of TagsDatabaseUtils.MergedDatabase
property the system will build a new reflection according with the relevant sources.
The merged database automatically drops in case of creating a new database or Reload
call.
To use the data base has to be loaded.
You may indicate the state using TagsDatabaseUtils.IsLoaded
property.
In case if it isn't loaded you have to request its load using the TagsDatabaseUtils.Reload
method.
You may get notified about loading finish by signing up on the TagsDatabaseUtils.onLoaded
event.
Following example shows safe way of database access.