docs.unity3d.com
    Show / Hide Table of Contents

    Class QueryResult

    Data returned from a particular query

    Inheritance
    Object
    QueryResult
    Namespace: Unity.MARS.Query
    Syntax
    public class QueryResult : IEquatable<QueryResult>

    Constructors

    QueryResult()

    Declaration
    public QueryResult()

    QueryResult(QueryMatchID)

    Declaration
    public QueryResult(QueryMatchID id)
    Parameters
    Type Name Description
    QueryMatchID id

    Fields

    queryMatchId

    Declaration
    public QueryMatchID queryMatchId
    Field Value
    Type Description
    QueryMatchID

    Properties

    DataID

    Declaration
    public int DataID { get; }
    Property Value
    Type Description
    Int32

    Methods

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean

    Equals(QueryResult)

    Declaration
    public bool Equals(QueryResult other)
    Parameters
    Type Name Description
    QueryResult other
    Returns
    Type Description
    Boolean

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    Reset()

    Declaration
    public void Reset()

    ResolveValue<T>(IUsesMARSData<T>)

    Gets the value for a particular type of data for a given data id

    Declaration
    public T ResolveValue<T>(IUsesMARSData<T> dataUser)
    Parameters
    Type Name Description
    IUsesMARSData<T> dataUser

    The functionality subscriber that will actually do the data lookup

    Returns
    Type Description
    T

    The typed value for the given data id

    Type Parameters
    Name Description
    T

    The type of data to return

    ResolveValue<T>(IUsesMARSTrackableData<T>)

    Gets the value for a particular type of data for a given data id

    Declaration
    public T ResolveValue<T>(IUsesMARSTrackableData<T> dataUser)
        where T : IMRTrackable
    Parameters
    Type Name Description
    IUsesMARSTrackableData<T> dataUser

    The functionality subscriber that will actually do the data lookup

    Returns
    Type Description
    T

    The typed value for the given data id

    Type Parameters
    Name Description
    T

    The type of data to return

    SetTrait(String, Object)

    Declaration
    public void SetTrait(string traitName, object value)
    Parameters
    Type Name Description
    String traitName
    Object value

    TryGetTrait(String, out Object)

    This method exists in order for MARS to compile before type-specific code is generated. Use the type-specific version of this method

    Declaration
    public bool TryGetTrait(string traitName, out object value)
    Parameters
    Type Name Description
    String traitName
    Object value
    Returns
    Type Description
    Boolean

    TryGetTrait<T>(String, out T)

    Declaration
    public bool TryGetTrait<T>(string traitName, out T value)
        where T : struct
    Parameters
    Type Name Description
    String traitName
    T value
    Returns
    Type Description
    Boolean
    Type Parameters
    Name Description
    T

    Operators

    Equality(QueryResult, QueryResult)

    Equality operators check if their operands are equal

    Declaration
    public static bool operator ==(QueryResult left, QueryResult right)
    Parameters
    Type Name Description
    QueryResult left

    Left

    QueryResult right

    Right

    Returns
    Type Description
    Boolean

    True if equal

    Inequality(QueryResult, QueryResult)

    Inequality operators check if their operands are are not equal.

    Declaration
    public static bool operator !=(QueryResult left, QueryResult right)
    Parameters
    Type Name Description
    QueryResult left

    Left

    QueryResult right

    Right

    Returns
    Type Description
    Boolean

    True if not equal

    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