Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How Can I put TWO Conditions

Discussion in 'Scripting' started by DoruKs1, Feb 1, 2015.

  1. DoruKs1

    DoruKs1

    Joined:
    Jan 14, 2015
    Posts:
    28
    Hello people. I just can't find a tutorial or a guide and I want your help. I wanna put 2 conditions to if statement (is if a statement?) . So I wanna have something like this:

    Code (CSharp):
    1.  if ( 3>1 and 5>3 )
    2. {
    3. Debug.Log("hi")
    4. }
    Help pls.
    ...
    yesIman0ob
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,000
    Jessy likes this.
  3. feiting

    feiting

    Joined:
    Oct 26, 2012
    Posts:
    33
    This belongs in the Scripting category. Please keep discussion to the Unity documentation.
     
    Jessy likes this.
  4. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,201
  5. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,386