Represents a boolean value stored as an integer, typically used for compatibility with compute shaders or GPU buffers.
public readonly struct Bool
Initializes a new instance of the Bool struct using a standard boolean value.
public Bool(bool value);
value System.Boolean
value
The boolean value to convert.
Initializes a new instance of the Bool struct using an integer value.
public Bool(int value);
value System.Int32
The integer value to convert (1 is treated as true, all other values are false).
The underlying integer representation of the boolean value, where 0 is false and 1 is true.
public readonly int Value;
System.Int32
Converts the internal integer representation back to a standard C# boolean.
public bool ToBool();
System.Boolean True if the internal value is 1; otherwise, false.
Returns a string representation of the boolean value.
public override string ToString();
System.String The string "True" or "False".
There was an error while loading. Please reload this page.