DataConsumerThemableBase<T> Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This class provides a way to load a resource via many different sources.
[System.Serializable]
public abstract class DataConsumerThemableBase<T> : MixedReality.Toolkit.Data.DataConsumerThemableBase where T : class
[<System.Serializable>]
type DataConsumerThemableBase<'T (requires 'T : null)> = class
inherit DataConsumerThemableBase
Public MustInherit Class DataConsumerThemableBase(Of T)
Inherits DataConsumerThemableBase
Type Parameters
- T
The type of the object expected from the data source, such as Image, Material, Texture2D, Sprite, Mesh
- Inheritance
- Derived
- Attributes
Remarks
The potential sources are based on the nature of the value received from the data source. For example the methods of the value retrieval can be:
- Object of correct type provided directly
- Numeric index lookup
- Key-value pair lookup
- Resource path to load a Unity resource; for example, "resource://pathToUnityResource"
- Streaming asset path to a file that can be loaded using any appropriate means; for example, "file://pathToUnityStreamingAsset"
Constructors
| Name | Description |
|---|---|
| DataConsumerThemableBase<T>() | |
Fields
| Name | Description |
|---|---|
| _attached | (Inherited from DataConsumerGOBase) |
| _bindingInfoList | (Inherited from DataConsumerThemableBase) |
| _componentsToManage | (Inherited from DataConsumerGOBase) |
| _dataController | (Inherited from DataConsumerGOBase) |
| _dataKeypathToBindingLookup | (Inherited from DataConsumerThemableBase) |
| _dataSourcesByType | (Inherited from DataConsumerGOBase) |
| _externalAttached | (Inherited from DataConsumerGOBase) |
| _isQuitting | (Inherited from DataConsumerGOBase) |
| _patternToRegexLookup | (Inherited from DataConsumerThemableBase) |
| _resolvedToLocalKeyPathLookup | (Inherited from DataConsumerGOBase) |
| _themeKeypathToBindingLookup | (Inherited from DataConsumerThemableBase) |
| ignoreKeyPathPrefix |
For items in collections, it can be useful to ignore the prefix prepended to local key paths, such as when it is used to look up theme data in a separate IDataSource. (Inherited from DataConsumerGOBase) |
| manageComponentsInChildren | |
| ResourcePrefix | |
| StreamingAssetPrefix | |
Properties
| Name | Description |
|---|---|
| AutoAttachAndDetach |
If |
| DataBindingProfiles | (Inherited from DataConsumerThemableBase) |
| DataController | (Inherited from DataConsumerGOBase) |
| DataSources |
Note that runtime changes to this will not be reflected in the serialized data for this component. (Inherited from DataConsumerGOBase) |
| DataSourceTypes |
Data source types used to identify an appropriate data source for automatic attachment. If no type is provided, the first data source found in parents will be used. (Inherited from DataConsumerGOBase) |
| IsFixedHierarchyWillUseCachedValues |
If |
| ResolvedKeyPathPrefix | (Inherited from DataConsumerGOBase) |
Methods
| Name | Description |
|---|---|
| AddKeyPathListener(String, IDataSource) |
Add a key path to the data source so that this object will be notified when it has changed. (Inherited from DataConsumerGOBase) |
| AddKeyPaths(HashSet<Component>) | |
| AddVariableKeyPathsForAllComponents(ISet<Component>) | (Inherited from DataConsumerGOBase) |
| AddVariableKeyPathsForComponent(Component) |
Add variable key paths for a component. (Inherited from DataConsumerGOBase) |
| Attach(Dictionary<String,IDataSource>, IDataController, String) |
Prepare this data consumer for use and attach to the provided external resources. (Inherited from DataConsumerGOBase) |
| AttachAllResources(Dictionary<String,IDataSource>, IDataController, String) | (Inherited from DataConsumerGOBase) |
| AttachDataConsumer() |
Perform any attach logic here that is specific to this data consumer. (Inherited from DataConsumerGOBase) |
| AttachDataSources(Dictionary<String,IDataSource>) | (Inherited from DataConsumerGOBase) |
| CheckAndUpdateAttach(Dictionary<String,IDataSource>, IDataController, String) | (Inherited from DataConsumerGOBase) |
| ComponentMeetsAllQualifications(Component) | UnityEngine.MonoBehaviour.ComponentMeetsAllQualifications(UnityEngine.Component) |
| ConfigureFromBindingProfile(String[], DataBindingProfile[]) | |
| DataChangeSetBegin(IDataSource) |
Mark beginning of a related set of data changes. (Inherited from DataConsumerGOBase) |
| DataChangeSetEnd(IDataSource) |
Mark beginning of a related set of data changes. (Inherited from DataConsumerGOBase) |
| Detach() |
Detach this data consumer and prepare to return to object pool. (Inherited from DataConsumerGOBase) |
| DetachDataConsumer() |
Perform any detach logic here that is specific to this data consumer. |
| DoesManageSpecificComponents() |
Report whether this is a Unity Component centric data consumer |
| FindComponentsOnGameObject(GameObject, Type) | (Inherited from DataConsumerGOBase) |
| FindComponentsToManage() |
Populate the caches of components that are being managed by this DataConsumer, based on the GetComponentTypes() provided. Separation of this method from the FindVariablesToManage() allows for calling this in Awake before the data sources may be present/ready if desired. (Inherited from DataConsumerGOBase) |
| FindDataSources(String[], Dictionary<String,IDataSource>) |
If no data source is provided directly, search through this object and its parents in game object hierarchy for the data source to use with this data consumer. (Inherited from DataConsumerGOBase) |
| FindDataSourcesInParents(String[], Dictionary<String,IDataSource>) |
Search through this object and its parents in game object hierarchy for the data source to use with this data consumer. (Inherited from DataConsumerGOBase) |
| FindDataSourcesInSingleton(String[], Dictionary<String,IDataSource>) |
Search through this object and its parents in game object hierarchy for the data source to use with this data consumer. (Inherited from DataConsumerGOBase) |
| FindNearestDataController(IDataController) |
If no data source is provided directly, search through this object and its parents in game object hierarchy for the data source to use with this data consumer. (Inherited from DataConsumerGOBase) |
| FindUnmanagedComponentsInChildren(GameObject, Type) | (Inherited from DataConsumerGOBase) |
| GetBestDataSource(String) | (Inherited from DataConsumerGOBase) |
| GetBestDataSourceForKeyPath(String, String, String) | (Inherited from DataConsumerGOBase) |
| GetComponentTypes() |
Get the component types. (Inherited from DataConsumerGOBase) |
| GetObjectByIndex(Int32) |
Given an int N, get the nth object of type T |
| GetObjectByKey(String) |
Given a string key, find and return object of type T |
| GetObjectByThemeLookupIndex(DataConsumerThemableBase+BindingInfo, Int32) |
Get a value within a binding profile using the theme key path at index |
| GetObjectByThemeLookupKey(DataConsumerThemableBase+BindingInfo, String) |
Get a value within a binding profile using this |
| InitializeDataConsumer() |
Perform any one time initialization here that is specific to this data consumer. (Inherited from DataConsumerGOBase) |
| IsAttached() |
Tell whether attached to a DataSource. (Inherited from DataConsumerGOBase) |
| IsInteger(Object, Int32) | |
| IsSameDataController(IDataController) | (Inherited from DataConsumerGOBase) |
| IsSameDataSources(Dictionary<String,IDataSource>) | (Inherited from DataConsumerGOBase) |
| IsSameKeyPathPrefix(String) | (Inherited from DataConsumerGOBase) |
| LoadStreamingAsset(String) |
Load a streaming asset as specified asset path and return as appropriate type. |
| ManageChildren() |
Report whether this data consumer should manage components on child game objects |
| NotifyDataChanged(IDataSource, String, Object, DataChangeType) |
Notification of a data change. (Inherited from DataConsumerGOBase) |
| NotifyThisConsumerKeypathsAdded() | (Inherited from DataConsumerGOBase) |
| OnDisable() |
A Unity event function that is called when the script component has been disabled. (Inherited from DataConsumerGOBase) |
| OnEnable() |
A Unity event function that is called when the script component has been enabled. (Inherited from DataConsumerGOBase) |
| ProcessDataChanged(IDataSource, String, String, Object, DataChangeType) |
Receive changed object, determine its, type and process appropriately |
| ProcessThemeOrDataChange(DataConsumerThemableBase+BindingInfo, Object, Object) |
Given a theme value and a data value, determine the final output value. |
| SelfAttach() |
Self attach is used when this Component is not being attached by another DataConsumer as would happen when DataConsumerCollection is instantiating prefabs and adding them to its collection. (Inherited from DataConsumerGOBase) |
| SetObject(Component, Object, T) |
Update the provided component using the objectToSet. |
| ShouldIncludeInactiveComponentsInChildren() |
Get whether or not to inactive child components should be included. (Inherited from DataConsumerGOBase) |