docs.unity3d.com
    显示 / 隐藏目录

    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)
    返回到顶部
    Copyright © 2023 Unity Technologies — 商标和使用条款
    • 法律条款
    • 隐私政策
    • Cookie
    • 不要出售或分享我的个人信息
    • Your Privacy Choices (Cookie Settings)