docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface ICondition<T>

    Used to filter data of a specific type in a query

    Inherited Members
    ICondition.traitName
    IConditionBase.enabled
    IRequiresTraits.GetRequiredTraits()
    Namespace: Unity.MARS.Query
    Assembly: Unity.MARS.Interfaces.dll
    Syntax
    public interface ICondition<T> : ICondition, IConditionBase, IRequiresTraits<T>, IRequiresTraits
    Type Parameters
    Name Description
    T

    The type of data to filter against

    Methods

    RateDataMatch(ref T)

    Describe how well a given piece of data matches a condition. 0 means the match is unacceptable, 1 means a perfect match

    Declaration
    float RateDataMatch(ref T data)
    Parameters
    Type Name Description
    T data

    The data to rate

    Returns
    Type Description
    float

    A number from 0 to 1 indicating how well a piece of data watches this condition

    Extension Methods

    IRequiresTraitsMethods.ForEachContextIdWithTrait<T>(IRequiresTraits<T>, string, Action<int>)
    IRequiresTraitsMethods.TryGetAllTraitsWithSemanticTag<T>(IRequiresTraits<T>, string, string, out Dictionary<int, T>)
    IRequiresTraitsMethods.TryGetTraitValue<T>(IRequiresTraits<T>, int, string, out T)
    IConditionGenericMethods.PassesCondition<T>(ICondition<T>, ref T)
    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)