Struct Bool | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct Bool

    Blittable replacement for bool in ECS structs

    Namespace: Unity.AI.Planner
    Syntax
    [Serializable]
    public struct Bool : IEquatable<Bool>

    Fields

    Value

    The value of the bool.

    Declaration
    public Bool.BoolValue Value
    Field Value
    Type Description
    Bool.BoolValue

    Methods

    Equals(Bool)

    Compares the value of two Bools

    Declaration
    public bool Equals(Bool other)
    Parameters
    Type Name Description
    Bool other

    The Bool with which to compare values

    Returns
    Type Description
    System.Boolean

    Returns true if both Bools have equal values

    GetHashCode()

    Computes the hash code of the Bool

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    Returns the hash code of the Bool

    Overrides
    System.ValueType.GetHashCode()

    ToString()

    Converts the Bool to a string

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    Returns the string representation of the Bool

    Overrides
    System.ValueType.ToString()

    Operators

    False(Bool)

    Operator for checking if Bool value is False

    Declaration
    public static bool operator false (Bool b)
    Parameters
    Type Name Description
    Bool b

    The Bool value to evaluate

    Returns
    Type Description
    System.Boolean

    Returns false if the value is False

    Implicit(Boolean to Bool)

    Operator for converting a bool to a Bool

    Declaration
    public static implicit operator Bool(bool b)
    Parameters
    Type Name Description
    System.Boolean b

    The bool value to convert

    Returns
    Type Description
    Bool

    Returns the Bool value of the argument

    Implicit(Bool to Boolean)

    Operator for converting a Bool to a bool

    Declaration
    public static implicit operator bool (Bool b)
    Parameters
    Type Name Description
    Bool b

    The Bool value to convert

    Returns
    Type Description
    System.Boolean

    Returns the bool value of the argument

    LogicalNot(Bool)

    Operator for getting the negated Bool value

    Declaration
    public static bool operator !(Bool b)
    Parameters
    Type Name Description
    Bool b

    The Bool value to evaluate

    Returns
    Type Description
    System.Boolean

    Returns the negated value

    True(Bool)

    Operator for checking if Bool value is True

    Declaration
    public static bool operator true (Bool b)
    Parameters
    Type Name Description
    Bool b

    The Bool value to evaluate

    Returns
    Type Description
    System.Boolean

    Returns true if value is True

    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