Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
  • Home /
avatar image
1
Question by SisterKy · Feb 06, 2012 at 12:58 AM · debugdebug.log

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;
     Debug.Log(collide);
     Debug.Log(Time.time);
   }
 }

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... -.-

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SisterKy · Feb 06, 2012 at 01:17 AM 1
Share

@Lo0Nuhti$$anonymous$$: 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 ins$$anonymous$$d of commented... +1 for comment is still just a rewardless gesture.
Edit: Aha, very good, someone turned it into an answer. Thanks!

avatar image Eric5h5 · Feb 06, 2012 at 04:35 AM 1
Share

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

avatar image SisterKy · Feb 06, 2012 at 09:23 PM 1
Share

@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.......

1 Reply

· Add your reply
  • Sort: 
avatar image
7
Best Answer

Answer by Lo0NuhtiK · Feb 06, 2012 at 01:05 AM

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image flamy · Feb 06, 2012 at 03:52 AM 0
Share

^^haha i second his point

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Is it just me, or does debug log crash unity on large iterations? 1 Answer

Console messages from multiple connected players on same machine 0 Answers

Where to see my app log 0 Answers

Debug.Log is causing an Assert 2 Answers

5.4 Debug Console won't open Debug.Log on double click 3 Answers


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