Class DataVisualsModule
Module that creates MARS proxies in the simulation to visualize data and control those objects
Namespace: Unity.MARS.Authoring
Syntax
public class DataVisualsModule : ScriptableSettings<DataVisualsModule>, IUsesFunctionalityInjection, IModule
Properties
DisableSimulationDataVisuals
Disable data visuals from being generated in simulation
Declaration
public bool DisableSimulationDataVisuals { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
RatingGradient
The standard gradient that can be used for coloring visuals based on their rating.
Declaration
public Gradient RatingGradient { get; }
Property Value
Type | Description |
---|---|
Gradient |
ShowDataVisualsInHierarchy
If enabled, the data visuals will be shown in the hierarchy
Declaration
public bool ShowDataVisualsInHierarchy { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
VisualsRoot
The root gameobject of all the data visual gameobjects.
Declaration
public GameObject VisualsRoot { get; set; }
Property Value
Type | Description |
---|---|
GameObject |
Methods
ClearDataRatings()
Clear the visualization of data ratings back to the default state.
Declaration
public void ClearDataRatings()
RequestDataVisuals(Object, Boolean)
Add or remove an object that needs data visuals. If there is at least one user requesting data visuals, they will be enabled.
Declaration
public void RequestDataVisuals(object user, bool enable)
Parameters
Type | Name | Description |
---|---|---|
Object | user | The object that is using data visuals, used to avoid duplicate requests. |
Boolean | enable | Whether the object needs data visuals enabled or not. |
VisualizeRatingsForData(Dictionary<Int32, Single>)
Trigger the data visualizers to change their state based on a given rating. If no rating is given for a particular ID, the rating is considered 0. All implementations of IDataVisual in the children of the VisualsRoot gameobject will be affected.
Declaration
public void VisualizeRatingsForData(Dictionary<int, float> ratingsForDataIDs)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<Int32, Single> | ratingsForDataIDs | The ratings for each piece of data as a float, keyed by data ID |