Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


bitmask(bool4)

Returns a bitmask representation of a bool4. Storing one 1 bit per component in LSB order, from lower to higher bits (so 4 bits in total). The component x is stored at bit 0, The component y is stored at bit 1, The component z is stored at bit 2, The component w is stored at bit 3 The bool4(x = true, y = true, z = false, w = true) would produce the value 1011 = 0xB
Read time 1 minuteLast updated 10 days ago

Definition

public static int bitmask(bool4 value)

Parameters

value

The input bool4 to calculate the bitmask for

Returns

Type

Description

intA bitmask representation of the bool4, in LSB order