This defines a data source which can be used with WMG_Series, WMG_Pie_Graph, or WMG_Ring_Graph.
More...
This defines a data source which can be used with WMG_Series, WMG_Pie_Graph, or WMG_Ring_Graph.
◆ WMG_DataSourceTypes
Enumerator |
---|
Single_Object_Multiple_Variables | |
Multiple_Objects_Single_Variable | |
Single_Object_Single_Variable | |
◆ WMG_VariableTypes
Enumerator |
---|
Not_Specified | |
Field | |
Property | |
Property_Field | |
Field_Field | |
◆ addDataProviderToList< T >()
void WMG_Data_Source.addDataProviderToList< T > |
( |
T |
dataProvider | ) |
|
Adds a data provider to dataProviders.
- Parameters
-
dataProvider | Data provider. |
- Template Parameters
-
◆ addVariableNameToList()
void WMG_Data_Source.addVariableNameToList |
( |
string |
variableName | ) |
|
Adds a variable name to variableNames.
- Parameters
-
variableName | Variable name. |
◆ getData< T >()
List<T> WMG_Data_Source.getData< T > |
( |
| ) |
|
Pulls a list of data such as a list of floats, from this data source.
- Returns
- The data.
- Template Parameters
-
◆ getDatum< T >()
T WMG_Data_Source.getDatum< T > |
( |
| ) |
|
Pulls a single value such as a float, from this data source.
- Returns
- The datum.
- Template Parameters
-
◆ removeDataProviderFromList< T >()
bool WMG_Data_Source.removeDataProviderFromList< T > |
( |
T |
dataProvider | ) |
|
Removes the specified data provider from dataProviders.
- Returns
true
, if data provider from list was removed, false
otherwise.
- Parameters
-
dataProvider | Data provider. |
- Template Parameters
-
◆ removeVariableNameFromList()
void WMG_Data_Source.removeVariableNameFromList |
( |
string |
variableName | ) |
|
Removes the specified variable name from variableNames.
- Parameters
-
variableName | Variable name. |
◆ setDataProvider< T >()
void WMG_Data_Source.setDataProvider< T > |
( |
T |
dataProvider | ) |
|
Sets dataProvider.
- Parameters
-
dataProvider | Data provider. |
- Template Parameters
-
◆ setDataProviders< T >()
void WMG_Data_Source.setDataProviders< T > |
( |
List< T > |
dataProviderList | ) |
|
Set entire list of data providers to dataProviders.
- Parameters
-
dataProviderList | Data provider list. |
- Template Parameters
-
◆ setVariableName()
void WMG_Data_Source.setVariableName |
( |
string |
variableName | ) |
|
◆ setVariableNames()
void WMG_Data_Source.setVariableNames |
( |
List< string > |
variableNames | ) |
|
Set entire list of variable names to variableNames.
- Parameters
-
variableNames | Variable names. |
◆ dataProvider
object WMG_Data_Source.dataProvider |
When using dataSourceType = Single_Object_Multiple_Variables or Single_Object_Single_Variable, this is the reference to the instanced script object from which data will be pulled.
◆ dataProviders
List<object> WMG_Data_Source.dataProviders = new List<object>() |
When using dataSourceType = Multiple_Objects_Single_Variable, this is the reference to the list of instanced script objects from which data will be pulled.
◆ dataSourceType
Determines the type of this data source in terms of multi vs single objects and multi vs single variables.
- Single_Object_Multiple_Variables: Expected data source refers to a single script object and multiple variables (Use dataProvider, and variableNames)
- Multiple_Objects_Single_Variable: Expected data source refers to multiple instanced script objects and a single variable (Use dataProviders, and variableName)
- Single_Object_Single_Variable: Expected data source refers to a single script object and a single variable (Use dataProvider, and variableName)
◆ variableName
string WMG_Data_Source.variableName |
When using dataSourceType = Multiple_Objects_Single_Variable or Single_Object_Single_Variable, this is the name of the variable from which data will be pulled.
Variable can correspond to the field of a property, for example Transform.localPosition.x (Transform is the data provider, and localPosition.x is the variableName). Use the setVariableName function to change this.
◆ variableNames
List<string> WMG_Data_Source.variableNames |
When using dataSourceType = Single_Object_Multiple_Variables, this is the name of the variables from which data will be pulled.
Variable can correspond to the field of a property, for example Transform.localPosition.x (Transform is the data provider, and localPosition.x is the variableName). Use the setVariableNames, addVariableNameToList, or removeVariableNameFromList functions to change this.
◆ variableType
Optionally set the variable type corresponding with variableName to slightly improve performance.
◆ variableTypes
Optionally set the variable type corresponding with variableNames to slightly improve performance.
The documentation for this class was generated from the following file:
- C:/Users/Stuart/Documents/Unity Projects/Graph Maker 5.0.1/Assets/Graph_Maker/Scripts/WMG_Data_Source.cs