• 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 Topthink · Aug 29, 2017 at 09:44 PM · debugstartawake

Why wouldn't Debug.Log show up in Start or Awake ?

The question says it all.

I'm trying to debug a program and I have a Debug.Log in Start and one in Awake and neither is firing for some reason.

Hmmmm.

 void Awake () 
     {
         Debug.Log ("Am I awake ???");
 
         for (int i = 0; i < 3; i++) {
             CreateAlly();
         }
     }
 
     void Start(){
         Debug.Log ("This is the start area !!!");
         }
 
 
Comment
Add comment · Show 6
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 DoYouSellVHS · Aug 29, 2017 at 11:27 PM 0
Share

Is the script attached to an object; and, if so, is there any error before the functions are called?

Show more comments
avatar image bobisgod234 · Aug 30, 2017 at 01:18 AM 0
Share

Either this script is not attached to a game object in the scene, or the game object that it is attached to is disabled, or you have disabled logging in the console (check the top right of the console window for 3 buttons, one with a ! in a speech bubble, another with a ! in a triangle, and a third with a ! in a octagon. $$anonymous$$ake sure they are all enabled)

Show more comments

3 Replies

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

Answer by DonutVendor · Aug 30, 2017 at 05:52 PM

alt text

Make sure you have debug messages set to show up in your console


untitled.png (4.2 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 Topthink · Sep 14, 2017 at 10:36 PM 0
Share

I really don't know what it was but I have it working. I reloaded Unity and re-coded my program (which wasn't long anyway) and did some other stuff.

It works fine.

Again, I really don't know what it was but I'll give your credit because you were probably right.

Thanks.

avatar image
0

Answer by ooblii · Aug 30, 2017 at 01:01 AM

The only way I can see this happening is if the script is not attached to a gameObject in the scene.

Comment
Add comment · Show 3 · 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 Topthink · Aug 30, 2017 at 02:22 PM 0
Share

Indeed. Except that it IS attached to a gameObject...in fact, I've put it on and taken it off a number of items to see if that might be the culprit.

I've tried rebooting and restarting and recoding and all that.

I'm having a number of other problems as well. I guess I could remove and re-load Unity and see if that works. I'm stumped here.

avatar image Topthink · Aug 30, 2017 at 02:24 PM 0
Share

...and thanks, by the way, I appreciate your response. I know it's sort of a nebulous problem...I think I'm just going to reload Unity and see if that works.

avatar image ooblii · Aug 30, 2017 at 02:26 PM 0
Share

did you try the second part to bobisgod234's answer? Could you have possibly disabled logging?

avatar image
0

Answer by Topthink · Aug 30, 2017 at 07:51 PM

I got to the point where the unity program was crashing almost every time I tried to run it to check for a debug message. And when it didn't crash, it was freezing/locking up and I couldn't do anything after that. I started writing a new program and got a message that the "bake" was paused while the program was running. Hmmmm. I hadn't baked anything yet...terrain or otherwise.

I must have corrupted the program/engine somehow...could be my electric personality. :)

I really don't know what it was but I deleted Unity, and reloaded it. And now it seems fine.

I appreciate those who took the time to assist me and I apologize that you had to take time for something that was probably my fault to begin with.

Thank you.

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 bobisgod234 · Aug 31, 2017 at 12:10 AM 0
Share

Baking is referring to Unity's Global Illu$$anonymous$$ation baking. Auto baking is enabled by default, and as such even in a blank scene you will see that, it is normal.

You can disable Auto Baking by going to Window -> Lighting -> Settings and at the bottom right of that window, unticking "Auto Generate".

avatar image ooblii · Aug 31, 2017 at 01:30 AM 0
Share

Glad you got it figured out. cheers.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

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

Debug.Log print order, or Awake vs Start issue? 1 Answer

Initialising List array for use in a custom Editor 1 Answer

ExecuteInEditMode Component construct "twice" and "reset" custom classes 0 Answers

OnEnable, Awake, Start order 8 Answers

Class c = new Class() okay in class body? 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