Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
7
Question by JayFitz91 · Jul 27, 2014 at 03:40 PM · consoledebug.logoutput

Console not outputting from Debug.Log()

I'm trying to Debug my code to see how far it makes it, but i'm not getting any response from my Debug.Log() functions, here is my code:

 using UnityEngine;
 using System.Collections;
 
 public class numberOfTaps : MonoBehaviour 
 {
     float timer;
     // Update is called once per frame
     
     private int tapCounter = 0;
     
     void Update () 
     {
         
         Debug.Log ("Hello"); //It doesn't even print this?
         int number = Random.Range(50, 250);
         Debug.Log (number);
         
         for (int i = 0; i < Input.touchCount; ++i)
         {
             if (Input.GetTouch(i).phase == TouchPhase.Began) 
             {
                 if(Input.GetTouch(i).tapCount == 1)
                 {
                     tapCounter += 1;
                 }
             }
         }
         
         Debug.Log (tapCounter);
         if(tapCounter == number)
         {
             renderer.material.color = Color.red;
         }
     }
 }

As you can see, my first "Hello" doesn't even get displayed on the console, now i am quite tired but I cant seem to see anything wrong, maybe a few sets of eyes can point out a reason for this?

EDIT: I've now taken all code except for the Debug.Log("Hello"); and I'm still getting nothing, not sure whats happening

Comment
Add comment · Show 1
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 muratsolak · Mar 14, 2021 at 08:52 PM 0
Share

Try ReImportAll.,Try to ReimportAll !

10 Replies

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

Answer by JayFitz91 · Jul 27, 2014 at 04:23 PM

I seem to have solved the problem by deleting the scene and script attached to the object and creating new ones, I used the exact same code in my script and it worked, don't know what caused it

Comment
Add comment · Show 2 · 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 OswaldP · Jan 07, 2016 at 10:08 AM 0
Share

I had the same problem with a script that would only output some print() and not all of them, some functions did not work correctly either. A copy/paste inside a new file (with the exact same code) solved the problems. It confuses me...

avatar image aligfx · Nov 14, 2020 at 05:51 PM 0
Share

I had the same issue with my script that would only output Debug.Log("Hey World"); it's doesn't work but it's work after creating a new Script and paste the same code in it.

avatar image
62

Answer by MrSteve1 · Jul 27, 2014 at 03:44 PM

Check to see if that particular output has been enabled in the console.

You can hide certain types of messages.

Se belowalt text


help1.jpg (68.5 kB)
Comment
Add comment · Show 8 · 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 JayFitz91 · Jul 27, 2014 at 03:50 PM 0
Share

I'm not seeing that in my console, just three 0's up there when i press play, nothing happens at all

avatar image Exbow · Jul 27, 2014 at 03:53 PM 1
Share

check if its clicked so it will be displayed, not the counter.

avatar image JayFitz91 · Jul 27, 2014 at 04:14 PM 0
Share

No I'm still getting nothing, I've removed all other code except the Debug.Log("Hello") and even that's not working. I'm going to remove the scene and script and re-do it as i've loaded up another scene where i have a counter and it's working fine

avatar image JayFitz91 · Jul 27, 2014 at 04:18 PM 1
Share

That seemed to do it, i used the exact same code but in a different scene/script and everything works ok now, don't know what caused that

avatar image lord_benry · Jan 27, 2020 at 04:20 PM 0
Share

Sometimes you can only see the buttons if you move the console and make it bigger.

Show more comments
avatar image
6

Answer by syahmicro · Aug 05, 2016 at 10:52 AM

i just fixed the problem..

step 1 : ctrl + shift + c step 2 : enable/click on 3 icons at right console as picture below:

alt text


capture.jpg (18.6 kB)
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 Goutham_Mannuru · Mar 24, 2020 at 11:00 PM 0
Share

Thank you, Your Comment was helpful , I wish i knew what Ctrl+Shift+C did to unity

avatar image
2

Answer by Tralfazy · Jul 11, 2017 at 01:20 AM

Debug.Log not showing.. Remove Component (script name), Add Component (script name) fixed it for me. Didn't need to delete scene.

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 oigetinthevan · Jan 05, 2021 at 07:57 PM 0
Share

Thanks, this did it for me. This kind of bug really throws one off.

avatar image
0

Answer by unity_epO43A6p7BZ8dQ · May 17, 2019 at 08:08 AM

@MonolithTyriss @JayFitz91 Try the suggestions from this link: https://forum.unity.com/threads/no-output-from-debug-log.498106/,@MonolithTyriss @JayFitz91 try this: https://forum.unity.com/threads/no-output-from-debug-log.498106/

Comment
Add comment · 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
  • 1
  • 2
  • ›

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

52 People are following this question.

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

Related Questions

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

Is there a way to make Console events write to the web browser's console? 3 Answers

How to access compiler warnings to i.e. output them to custom console? 1 Answer

Can I change the destination of selecting console entries 0 Answers

Unity Console not showing result 1 Answer


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