docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method bitmask

    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

    Declaration
    public static int bitmask(bool4 value)
    Parameters
    Type Name Description
    bool4 value

    The input bool4 to calculate the bitmask for

    Returns
    Type Description
    int

    A bitmask representation of the bool4, in LSB order

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)