If Expression True in Immediate Window But Code In if Block Never Runs
Posted
by
Julian
on Game Development
See other posts from Game Development
or by Julian
Published on 2013-11-07T04:04:44Z
Indexed on
2013/11/07
4:16 UTC
Read the original article
Hit count: 386
I set a break point in my code in MonoDevelop to break whenever I click on a surface. I then enter the immediate window and test to see if the the if statement will return true in comparing two Vector3's. It does return true. However, when I step over, the code is never run as though the statement evaluated false. Does anyone know how this could be possible? I've attached a screenshot.
Here is the picture of my debug window and immediate window. You can see where the immediate window evaluates to true. The second breakpoint is not hit.
Here are the details of the two Vector3's I am comparing.
Does anyone know why I am experiencing this? It really seems like an anomaly to me :/ Does it have something to do with threading?
© Game Development or respective owner