• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges

If-statements

Cancel

Cancel

All Questions

  • Unanswered Questions
avatar image

wideeyenow_unity edited

If statement efficiency question

12 hours ago in Help Room

2 Replies

0 Votes

avatar image

VinGame90 edited

Generating a number until a condition is met

6 days ago if-statements·condition

2 Replies

0 Votes

avatar image

TheTrueDuck answered

error CS0120: An object reference is required for the non-static field, method, or property when trying to reference a bool?

Aug 3, '22 in Help Room

1 Reply

0 Votes

avatar image

DaDudi commented

Detecting gameobjects in a collider in an if statement

Jul 26, '22 collider·if-statements

1 Reply

0 Votes

avatar image

TSCSimulation_AH commented

NavMeshAgent.destination always gives inaccurate values

Jul 12, '22 in Help Room

0 Replies

0 Votes

avatar image

janv_unity813 commented

If else if else How to use them | Idle direction based on last walk direction | Multiple booleans in if statement?

Jul 8, '22 character controller·if-statements·booleans·else if

1 Reply

0 Votes

avatar image

tormentoarmagedoom commented

i wanna change the for loop function every time i move my player, anybody know how to do it? im a newbie btw. thanks

Jul 4, '22 if-statements·for loop

0 Replies

0 Votes

avatar image

Baniucha edited

How to display a certain string out of array depending on a number?

Jun 30, '22 array·string·if-statements·loops

1 Reply

0 Votes

avatar image

tormentoarmagedoom commented

Trying to make a sprite flip based on walking direction as well as camera position

Jun 23, '22 sprites·if-statements·spriterenderer·flip·flips

0 Replies

0 Votes

avatar image

Relativt_Ukendt edited

How To Make UI Button 2 Appear Three Seconds After UI Button 1 is pressed

Jun 17, '22 button·coroutine·loop·if-statements·waitforseconds

2 Replies

0 Votes

avatar image

WizardGoose answered

Infinite Instantiation

May 16, '22 in Help Room

2 Replies

0 Votes

avatar image

sansuno68 commented

Code inside if statement not working

May 10, '22 if-statements

0 Replies

0 Votes

avatar image

takaraemisaito1994 published

If statement works but some code inside it doesn't work. ,

Apr 12, '22 in Help Room

0 Replies

0 Votes

avatar image

Cathair edited

How do you trigger a collider to become enabled after the player collider isn't touching it anymore?

Apr 11, '22 collision·collider2d·boolean·if-statements·while

4 Replies

1 Votes

avatar image

bacon_nugget edited

Image does not display correctly after fulfilling the conditions

Apr 5, '22 c#·image·if-statements·validation

1 Reply

0 Votes

avatar image

PresidentTree edited

Why is an else-if statement breaking my dialogue system? Closed

Apr 2, '22 scripting problem·if-statements·script error·dialogue·else if

2 Replies

0 Votes

avatar image

elsquaddie commented

How to change sprite after several clicks?

Mar 24, '22 in Help Room

1 Reply

0 Votes

avatar image

Rachmanichou answered

Why my function not working with less than velocity?,why my function not work with an If statements with a greater/less than

Mar 22, '22 collision·velocity·if-statements·if

1 Reply

1 Votes

avatar image

NadiaTheHorse published

Color triggered collider?

Mar 18, '22 in Help Room

0 Replies

0 Votes

avatar image

Master109 edited

Prevent overlapping of spawned object over AI and Player

Mar 18, '22 physics2d·if-statements·physics.overlapsphere

1 Reply

0 Votes

avatar image

grimreefer24601 edited

Boolean on if statement not working

Mar 17, '22 collision·if-statements·booleans

2 Replies

0 Votes

avatar image

Gizza_Impact answered

Am I misunderstanding how this code should function?

Mar 8, '22 in Help Room

1 Reply

0 Votes

avatar image

Bambivalent answered

Create DoTween from for loop?

Feb 21, '22 if-statements·for-loop·integer·lambda

1 Reply

0 Votes

avatar image

hacvanbeek answered

Removing If-statements

Feb 14, '22 in Help Room

2 Replies

0 Votes

avatar image

Captain_Pineapple commented

if statement only ever triggering the first condition even if it's false and the second one is true

Feb 6, '22 c#·arrays·if-statements·if statement

0 Replies

0 Votes

avatar image

Bingowaders commented

Is Destroy(transform.parent.gameObject) Unreliable?

Jan 14, '22 destroy·if-statements·ontriggerstay·destroygameobject

1 Reply

0 Votes

avatar image

wfreeman480 commented

Making text appear when a parameter is met.

Jan 3, '22 in Help Room

1 Reply

0 Votes

avatar image

hsgaminators commented

Is my if statement changing my Euler angle value?

Dec 6, '21 rotation·quaternion·if-statements·eulerangles·conditional

1 Reply

0 Votes

avatar image

jmhoubre edited

My if statement isn't running even though all requirements are true

Nov 30, '21 c#·if-statements

1 Reply

0 Votes

avatar image

basharmilesteg42 asked

If else block acts extremely weird

Nov 24, '21 in Help Room

0 Replies

0 Votes

  • 1
  • 2
  • 3
  • 4
  • 5
  • ›
  • »

Followers

avatar image avatar image

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Related Topics

c# if scripting problem boolean if statement bool javascript animation if-else collision input gameobject instantiate else position update button else if trigger transform rotation variable gui error raycast


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies 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.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges