docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CompareToDataModule

    Compares data chosen in the simulation view to conditions and allows conforming the conditions to match.

    Inheritance
    object
    CompareToDataModule
    Implements
    IModuleDependency<DataVisualsModule>
    IModuleDependency<QueryPipelinesModule>
    IModule
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.MARS.Authoring
    Assembly: Unity.MARS.dll
    Syntax
    [MovedFrom("Unity.MARS")]
    public class CompareToDataModule : IModuleDependency<DataVisualsModule>, IModuleDependency<QueryPipelinesModule>, IModule

    Properties

    IsComparing

    Get whether the module is currently comparing data

    Declaration
    public bool IsComparing { get; }
    Property Value
    Type Description
    bool

    ProxyToCompare

    The proxy that is being compared to data currently

    Declaration
    public Proxy ProxyToCompare { get; }
    Property Value
    Type Description
    Proxy

    Methods

    GetComparisonData(int)

    Get the current data to be used for comparison.

    Declaration
    public TraitDataSnapshot GetComparisonData(int selectionIndex = 0)
    Parameters
    Type Name Description
    int selectionIndex

    The index into the current selection if there is multiple objects selected. Defaults to 0

    Returns
    Type Description
    TraitDataSnapshot

    The selected or hovered data

    GetConditionRatings(List<KeyValuePair<string, float>>)

    Get the condition rating results as a list of key value pairs. Each pair is a condition name and float rating from 0 to 1

    Declaration
    public void GetConditionRatings(List<KeyValuePair<string, float>> conditionRatingsResult)
    Parameters
    Type Name Description
    List<KeyValuePair<string, float>> conditionRatingsResult

    The list that will be cleared and populated with the results

    IncludeAll()

    For each condition on the proxy set via SetProxyToModify, try to include the current comparison data. Only enabled conditions that implement ICreateFromData will be modified.

    Declaration
    public void IncludeAll()

    OnDataSelectionChanged(List<Proxy>)

    Change the data proxy that is being compared against the main proxy. The current match data for each proxy will be captured. Selected data will be used for comparison if there is no data being hovered.

    Declaration
    public void OnDataSelectionChanged(List<Proxy> proxies)
    Parameters
    Type Name Description
    List<Proxy> proxies

    A list of all the data proxies that are currently selected

    OnHoverChange(Proxy)

    Start or change the data that is currently being hovered to compare against the main proxy.

    Declaration
    public void OnHoverChange(Proxy proxy)
    Parameters
    Type Name Description
    Proxy proxy

    A proxy that is matched to the data to compare

    OnHoverEnd()

    End the current hover. After calling this, the comparison data will use the data set via OnDataSelectionChanged

    Declaration
    public void OnHoverEnd()

    OptimizeAll()

    For each condition on the proxy set via SetProxyToModify, try to optimize for the current comparison data. Only enabled conditions that implement ICreateFromData will be modified.

    Declaration
    public void OptimizeAll()

    SetProxyToCompare(Proxy)

    Sets the proxy whose conditions will be compared against data. The proxy must be active and running. The proxy that will be modified via Include or Optimize actions must be set separately via SetProxyToModify

    Declaration
    public void SetProxyToCompare(Proxy proxy)
    Parameters
    Type Name Description
    Proxy proxy

    An active running proxy whose conditions will be compared to data

    SetProxyToModify(Proxy)

    Sets the proxy that will be modified when compare actions "Include" and "Optimize" This can be different from the proxy set via SetProxyToCompare. For example, when simulating the proxy to compare is the active copy, but the proxy to modify is the original scene version.

    Declaration
    public void SetProxyToModify(Proxy proxy)
    Parameters
    Type Name Description
    Proxy proxy

    The proxy whose conditions will be modified.

    StartComparing()

    Start comparing and request data visuals to show the rating for the conditions on the proxy set via SetProxyToCompare

    Declaration
    public void StartComparing()

    StopComparing()

    Stop comparing and clear any data visuals showing a rating.

    Declaration
    public void StopComparing()

    Events

    CompareDataChanged

    Called when the data being compared has changed

    Declaration
    public event Action CompareDataChanged
    Event Type
    Type Description
    Action

    Implements

    Unity.XRTools.ModuleLoader.IModuleDependency<T>
    Unity.XRTools.ModuleLoader.IModuleDependency<T>
    Unity.XRTools.ModuleLoader.IModule
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)