Doloro GDK 22 .1.0 Beta
by Tauri Interactive
Asset Properties Collection

About

AssetPropertiesCollection (APC) is a component that represents an AssetProperty instances hub. You may consider it like a space of virtual memory where you can always allocate a property at runtime.

The component supplies you with both:

  • API from managing the properties via the code.
  • In-editor GUI that allows you to manage properties via inspector.

See also:


Getting started

Beginning

To start the work with the Asset Properties Collection you need to:

  1. Create new GameObject in Hierarchy window or selected exists one.
  2. Add Asset Properties Collection via Add Component menu by path
    Doloro GDK \ Data Management \ Asset Properties Collection

At that point you should see new created APC component ready to use.


GUI properties management

Creation of a property

  1. Select game object with APC component in Hierarchy window.
  2. Find the component in the Inspector window
  3. At the bottom of the component's GUI you have to find Add property button.
  4. Press the button!
  5. You got property creation menu. Warning: The window auto-closes in case of focus lose.
    1. Select the type of creating property of the top drop-down list.
    2. (optional) Enter property domain to locate. Sub-domains should be divided with . symbol.
    3. Enter property name.
    4. Confirm creation with Add button below the window.

Expected result:
Now you have to see created blue header of the domain and properties list located within the domain. Domain defined at the Blue bar. Property located within reordable list below the domain section.

In example on screenshot:

  • Domain has been set to ExampleDomain
  • Type of property is Float
  • Name of property New property

Addition of a property to domain

You may add a property directly to certain domain by pressing the + button at the bottom of GUI list located under domain related section.

Removing a property

To remove a property:

  1. Select it in reordable list in scope of its domain.
  2. Press - button in below the reordable list GUI element.

Searching for property

In case you object has a lot of properties you may find useful a search option via search bar located at the top of the component GUI.

The search goes both by the domain and property name. After entering the searching part into the search field the GUI automatically be filtered from not matched elements.


Code properties management

AssetPropertiesCollection implements regular ICollection<AssetProperty> interface that makes it easy to work with its content.

Any more advance methods could be found via script's API. Explore the class details to find out required method to handle the task.

API: Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection


Cross-session data

APC component implements ISessionPropertiesProvider interface that makes it easy to save and load its content via serialization utils like a Serialization Tools.

To interact with the content in binary format use the following methods:

  • bool TryReadFromBinary(byte[] data)
  • void ReadFromBinary(byte[] data)
  • byte[] ToBinary()

See also