DataRetrievalMethod Enum

Definition

The method of retrieving the final value of the correct type for a data/theme binding to a UX element.

C#
public enum DataRetrievalMethod
Inheritance
DataRetrievalMethod

Fields

Name Value Description
AutoDetect 0

Automatically determine the type from analyzing the nature of the provided data.

DirectValue 1

Direct value is expected of the correct type from data source with no theming.

DirectLookup 2

An integral index or string key is expected and used to look up the desired value from a local lookup table.

StaticThemedValue 3

A themed object of the correct type is expected from the theme data source, where the object to be themed is itself not variable via a separate data binding value.

ThemeKeypathLookup 4

An integral index or string key used to look up the desired theme keypath locally.

ThemeKeypathProperty 5

A string property value that will be appended to the theme base keypath provided in the theme helper.

ResourcePath 6

A resource path for retrieving the value from a Unity resource. This is a string of the form "resource://path_to_resource".

FilePath 7

A file path for retrieving a Unity streaming asset. This is a string of the form "file://path_to_streaming_asset".

Examples

An example usage may be:

  1. A numeric value called SystemInfo.Status exists in the database and available from a data source.
  2. The numeric value can be used to lookup a theme keypath; for example, 0 means Icons.Queued, 1 means Icons.Started, 2 means Icons.Cancelled, 3 means Icons.Completed
  3. This new value Icons.Queued is then used to retrieve the correct Sprite from the theme data source.

Remarks

There may be both variable data and theme data:

  1. Retrieve data value at DataKeyPath from a data source.
  2. Optionally transform this value into a form that can be used to retrieve the final themed value.
  3. Use this new value to then retrieve the final themed value.

This is an experimental feature. This class is early in the cycle, it has been labeled as experimental to indicate that it is still evolving, and subject to change over time. Parts of the MRTK, such as this class, appear to have a lot of value even if the details haven't fully been fleshed out. For these types of features, we want the community to see them and get value out of them early enough so to provide feedback.

Applies to

Proizvod Verzije
MRTK3 Core Definitions 3.0, 3.1, 3.2