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

    Class IUsesQueryResultsExtensionMethods

    Inheritance
    Object
    IUsesQueryResultsExtensionMethods
    Namespace: Unity.MARS.Query
    Syntax
    public static class IUsesQueryResultsExtensionMethods

    Methods

    AssignQueryMatch(IUsesQueryResults, QueryMatchID, Int32, Boolean)

    Try to assign a new data match to a Proxy, instead of the match being picked automatically.

    Declaration
    public static bool AssignQueryMatch(this IUsesQueryResults caller, QueryMatchID queryMatchId, int newMatchId, bool matchConditions = true)
    Parameters
    Type Name Description
    IUsesQueryResults caller

    The object that had made a query

    QueryMatchID queryMatchId

    The query identifier to assign the match for

    Int32 newMatchId

    The identifier of the data to assign as the match

    Boolean matchConditions

    If true, all Conditions on the Proxy must be met by the new data. If false, the data only has to have all the traits required by the Proxy.

    Returns
    Type Description
    Boolean

    A description of the result of the call

    RegisterQuery(IUsesQueryResults, QueryArgs)

    Registers to get event(s) from the MARS backend

    Declaration
    public static QueryMatchID RegisterQuery(this IUsesQueryResults caller, QueryArgs queryArgs)
    Parameters
    Type Name Description
    IUsesQueryResults caller

    The object making the query

    QueryArgs queryArgs

    The different specified data requirements we are querying for

    Returns
    Type Description
    QueryMatchID

    A ID that identifies this series of queries

    UnregisterQuery(IUsesQueryResults, QueryMatchID, Boolean)

    Notifies the MARS backend that a particular query is no longer needed. This function is not required if the Registration was oneShot - the query will be unregistered automatically

    Declaration
    public static bool UnregisterQuery(this IUsesQueryResults caller, QueryMatchID queryMatchID, bool allMatches = false)
    Parameters
    Type Name Description
    IUsesQueryResults caller

    The object that had made a query

    QueryMatchID queryMatchID

    The identifier of the query

    Boolean allMatches

    Whether to unregister all matches referring to the same query as queryMatchID

    Returns
    Type Description
    Boolean

    True if the query was stopped, false if the query was not currently running

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