Before updating to Windows 10 you may need to return your Pro license. More information here

Debug.Log(Time.time) prints continuously, Debug.Log(someValue) prints only once?

Ok, this freaks me out. I basically have this:

 var collide:boolean = false;

 function Update (){
   if (blah) {
     collide = true;

My output is lots and lots of Time, but only a single 'true'.
So what the heck's happening?

Are values only printed in Debug.Log when they got changed, or something?
I don't think that's been like that all the time? I'm pretty sure I used to get continuous 'true's, too...
When did they change that?
Or can you set that as a preference somewhere and I accidentally hit the wrong button?

This is disturbing...
Here I thought my 'if' got only true for a single frame when it really goes on and on to be true...
Or am I wrong to assume by the pinting of 'Time' that my if is continuously true? o.o

And here I thought I had finally at least mastered the very base-di-basics of Debugging... -.-

more ▼

asked Feb 06, 2012 at 12:58 AM

avatar image

3.4k 82 95 174

@Lo0NuhtiK: GENIOUS!! Drat... I suspected I had just hit the wrong button but couldn't find it if my live depended on it, d'oh! xD Thank you so much! Now it all makes sense again... lord... time for bed for me!

Wish you had answered instead of commented... +1 for comment is still just a rewardless gesture.
Edit: Aha, very good, someone turned it into an answer. Thanks!

Feb 06, 2012 at 01:17 AM SisterKy

...Which you haven't accepted.... :cough:

Feb 06, 2012 at 04:35 AM Eric5h5

blushes to a deep red .....
Drat, you are right...!!

Since I had already up-voted (so already a green light there), I forgot about the very-close-to-useless non-reward-yielding deco-button... Huge loss :p....

But sarcasm-towards-UA aside... esp. since I am one of the law-and-order-nittpickers around here, you are completely right! Thank you for pointing it out... -.-' embarrassing..... I believe (I hope!) I would have noticed eventually, but anyway... thanks.......

Feb 06, 2012 at 09:23 PM SisterKy
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

do you have collapse turned on in your console? If you do, it will only show the boolean once when false, then once when true. Turn off collapse and try it.

more ▼

answered Feb 06, 2012 at 01:05 AM

avatar image

7.1k 6 25 59

^^haha i second his point

Feb 06, 2012 at 03:52 AM flamy
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Feb 06, 2012 at 12:58 AM

Seen: 2043 times

Last Updated: Feb 06, 2012 at 09:24 PM