docs.unity.cn
    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
    Int32

    A bitmask representation of the bool4, in LSB order

    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