docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class IUsesQueryResultsExtensionMethods

    Extension methods for IUsesQueryResults interface

    Inheritance
    object
    IUsesQueryResultsExtensionMethods
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.MARS.Query
    Assembly: Unity.MARS.dll
    Syntax
    public static class IUsesQueryResultsExtensionMethods

    Methods

    AssignQueryMatch(IUsesQueryResults, QueryMatchID, int, bool)

    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

    int newMatchId

    The identifier of the data to assign as the match

    bool 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
    bool

    A description of the result of the call

    ModifyQuery(IUsesQueryResults, QueryMatchID, QueryArgs)

    Notifies the MARS backend that a particular query's arguments have been modified.

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

    The object making the query

    QueryMatchID queryMatchID

    The identifier of the query

    QueryArgs queryArgs

    The different specified data requirements we are querying for

    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, bool)

    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

    bool allMatches

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

    Returns
    Type Description
    bool

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

    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)