docs.unity3d.com
    Show / Hide Table of Contents

    Class DataVisualsModule

    Module that creates MARS proxies in the simulation to visualize data and control those objects

    Inheritance
    Object
    DataVisualsModule
    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

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023