Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 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?

avatar image Topthink DoYouSellVHS · Aug 30, 2017 at 03:13 PM 0
Share

No errors at all are showing.

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)

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

Thanks. I'm trying to figure this out. I appreciate your help.

avatar image Topthink bobisgod234 · Aug 30, 2017 at 03:21 PM 0
Share

I've clicked those buttons (speech bubble, triangle, octagon)...and I've clicked them and I've clicked them...I've tried every combination of those. No cigar there.

The script is attached to an object...odd thing though, whenever I add an "empty" object and attach the script to that, the unity program totally freezes and I am forced to stop it by Ctrl-Alt-Del...I've added scripts to empty objects before and I've never had Unity freeze from that before.

I never "disabled" the objects...at least I don't think so...in fact, I'm not even sure how to do that. I'll try to find something in the manual about that to see if that could be the culprit though.

avatar image ooblii Topthink · Aug 30, 2017 at 03:23 PM 0
Share

Have you tried the script in a new empty scene? Are you able to post the entire code?

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.

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

awake and start functions not working 2 Answers

C# void names 1 Answer

If I have 2 different scripts both have Awake() on 2 different GameObjects, which Awake() starts first? 2 Answers

Difference between "lifetime of the script instance" and "lifetime of the behaviour"? 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