docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Logic Operators

    Perform Boolean operations and conditional branching.

    Page Description
    And Output true if both inputs are true.
    Branch Test a Boolean and return different values for true and false.
    Compare Compare two floats based on a condition and return the result as a Boolean.
    Nand Output true if at least one input is false.
    Nor Output true if both inputs are false.
    Not Output true if an input is false, and vice versa.
    Or Output true if either input is true.
    Switch Compare an input to case values, and output a value depending on the case.

    Additional resources

    • Bitwise Operators
    In This Article
    Back to top
    Copyright © 2025 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)