Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[SOLVED] print and Debug.Log don't working

Discussion in 'Scripting' started by Recksarr, Aug 25, 2019.

  1. Recksarr

    Recksarr

    Joined:
    Aug 25, 2019
    Posts:
    4
    Hello everybody! I have a problem with Unity 5.6.7 and need your help. If simply print and Debug.Log don't working outside Start () or Update () functions. I've tried to delete and create this script, tried different objects to contain it, tried to deactivate/activate script and object, but print and Debug.Log still don't working. I haven't ever met such problem. Thanks for your answers!
     
  2. Deleted User

    Deleted User

    Guest

  3. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    in the console window, top right, check that log is enabled,

    enabled: (toggled on)
    upload_2019-8-25_18-44-43.png

    disabled (toggled off)
    upload_2019-8-25_18-45-6.png
     
    klionikos and afrederick like this.
  4. Recksarr

    Recksarr

    Joined:
    Aug 25, 2019
    Posts:
    4
    I think it's not needed. For described case i took simple

    void Hellohello () {
    print ("Hello!");
    }

    And I still don't see "Hello!" message. Note that all flags above are turned on
     
  5. Recksarr

    Recksarr

    Joined:
    Aug 25, 2019
    Posts:
    4
    I tried toggle them on and off, but result is staying same
     
  6. Deleted User

    Deleted User

    Guest

    If you don't call HelloHello() in Start(), Update() or other functions, "Hello!" will never print.
     
  7. Recksarr

    Recksarr

    Joined:
    Aug 25, 2019
    Posts:
    4
    Thank you! It really helped, I completely forgot to call it! Thank you, once more!