The If statement condition is false but the if statement stills executes
so i wrote this if statement
and it checks these conditions so it executes my Jump(); Function so if you look at the Debug.Log(); it should never return false since it is the same condition in the if statement yet i get in my console : " if result: false"
what is this sorcery PLEASE HELP ME!!
Answer by brunocoimbra · Oct 15, 2017 at 04:18 PM
You probably is doing something inside the Jump() method that changes the statement result. You should move the debug line to before the Jump() method call.
Your answer
![](https://koobas.hobune.stream/wayback/20220612141000im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Add changeable conditions in the editor, similar to unityEvent? 0 Answers
SqrMagnitude intermittently doesn't work for if statement on prefab. (C sharp) 1 Answer
If statement for direction the character is facing 0 Answers
Is There A Way To Make If Statement Condition Shorter 3 Answers
Help with rotation please 2 Answers