docs.unity3d.com
    Show / Hide Table of Contents

    Interface IRelation<T>

    A constraint between two MR objects that is used to filter data in a query

    Inherited Members
    IRelationBase.child1
    IRelationBase.child2
    IConditionBase.enabled
    IRequiresTraits.GetRequiredTraits()
    Namespace: Unity.MARS.Query
    Syntax
    public interface IRelation<T> : IRelation, IRelationBase, IConditionBase, IRequiresTraits<T>, IRequiresTraits
    Type Parameters
    Name Description
    T

    The type of data to filter against

    Properties

    child1TraitName

    The trait to test against for the first child

    Declaration
    string child1TraitName { get; }
    Property Value
    Type Description
    String

    child2TraitName

    The trait to test against for the second child

    Declaration
    string child2TraitName { get; }
    Property Value
    Type Description
    String

    Methods

    RateDataMatch(ref T, ref T)

    Compares the given trait data to the filter function

    Declaration
    float RateDataMatch(ref T child1Data, ref T child2Data)
    Parameters
    Type Name Description
    T child1Data

    The data being filtered against for the first child

    T child2Data

    The data being filtered against for the second child

    Returns
    Type Description
    Single

    A number from 0 to 1 indicating how well a set of data matches

    Extension Methods

    IRequiresTraitsMethods.TryGetTraitValue<T>(IRequiresTraits<T>, Int32, String, out T)
    IRequiresTraitsMethods.TryGetAllTraitsWithSemanticTag<T>(IRequiresTraits<T>, String, String, out Dictionary<Int32, T>)
    IRequiresTraitsMethods.ForEachContextIdWithTrait<T>(IRequiresTraits<T>, String, Action<Int32>)
    IRelationGenericMethods.PassesRelation<T>(IRelation<T>, ref T, ref T)
    Back to top
    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