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