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

What happened to "print()"?

Discussion in 'Scripting' started by bigkahuna, Dec 3, 2007.

  1. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
  2. jeremyace

    jeremyace

    Joined:
    Oct 12, 2005
    Posts:
    1,661
    They will most likely keep it in to keep from breaking older code. They have done that with a number of functions to keep old projects working.

    -Jeremy
     
  3. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Thanks Jeremy, if that's the case (and that's what I suspect also) then I would recommend they also change the script examples in the docs that use it. All in all, it's a pretty minor thing though.
     
  4. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Dang.

    I just switched from using Debug.Log() to using Print() because it's quicker to type.
     
  5. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    print still works exactly like it used to do and there is no intention to change that.
     
  6. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Ok, thanks for clearing that up Joe. I'll file the missing documentation as a bug report...
     
  7. freyr

    freyr

    Joined:
    Apr 7, 2005
    Posts:
    1,148
    Although, as Joe mentioned, print isn't going anywhere, did you know you can save even more typin' in Javascript by doing this?
    Code (csharp):
    1.  
    2. import UnityEngine.Debug;
    3.  
    4. function Start() {
    5.      Log("Se Ma'! No Debug!");
    6. }
    7.  
    8. function OnMouseDown() {
    9.      Log("Se Ma'! No Debug!");
    10. }
    11.  
    12.  
     
  8. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Sweet!

    So many choices ... that's what I love about Unity. ;-)
     
  9. podperson

    podperson

    Joined:
    Jun 6, 2006
    Posts:
    1,371
    Now we need the homage to AppleSoft Basic, where:

    10 ? "HELLO, WORLD"

    worked ("?" was a shortcut for PRINT).