docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface ICreateFromDataPair

    Interface for a relation that can be created from 2 pieces of data and added to a set with 2 children

    Namespace: Unity.MARS.Authoring
    Assembly: Unity.MARS.dll
    Syntax
    [MovedFrom("Unity.MARS")]
    public interface ICreateFromDataPair

    Methods

    ConformToData(TraitDataSnapshot, TraitDataSnapshot)

    Modifies the properties so that the data is acceptable for this relation

    Declaration
    void ConformToData(TraitDataSnapshot child1Data, TraitDataSnapshot child2Data)
    Parameters
    Type Name Description
    TraitDataSnapshot child1Data

    The data for child 1 that should pass this relation after this method is called

    TraitDataSnapshot child2Data

    The data for child 2 that should pass this relation after this method is called

    FormatDataString(TraitDataSnapshot, TraitDataSnapshot)

    Formats data into a string that is human-readable and appropriate for the relation

    Declaration
    string FormatDataString(TraitDataSnapshot child1Data, TraitDataSnapshot child2Data)
    Parameters
    Type Name Description
    TraitDataSnapshot child1Data

    The data for child 1

    TraitDataSnapshot child2Data

    The data for child 2

    Returns
    Type Description
    string

    The formatted string

    OptimizeForData(TraitDataSnapshot, TraitDataSnapshot)

    Modifies the properties so that the data is the optimal data for this relation

    Declaration
    void OptimizeForData(TraitDataSnapshot child1Data, TraitDataSnapshot child2Data)
    Parameters
    Type Name Description
    TraitDataSnapshot child1Data

    The data that should be optimal for child 1 after this method is called

    TraitDataSnapshot child2Data

    The data that should be optimal for child 2 after this method is called

    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)