docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Logic Operators

    Perform Boolean operations and conditional branching.

    Page Description
    And Operator Output true if both inputs are true.
    Branch Operator Test a Boolean and return different values for true and false.
    Compare Operator Compare two floats based on a condition and return the result as a Boolean.
    Nand Operator Output true if at least one input is false.
    Nor Operator Output true if both inputs are false.
    Not Operator Output true if an input is false, and vice versa.
    Or Operator Output true if either input is true.
    Switch Operator 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 © 2026 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)