docs.unity3d.com
    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
    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
    Single

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

    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>)
    IConditionGenericMethods.PassesCondition<T>(ICondition<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