Anything like console.log()?

Hi, I’ve just started with unity 2 days ago, and I’m wondering if there’s something like console.log method or printf so that I can see outputs of different variables in a console?

That would help me learn faster, but I didn’t find anything exact in documentation. Thanks!

Debug.Log, Debug.LogError, and Debug.LogWarning - though I’m fairly certain they only work with MonoDevelop, so if you use Visual Studio you’ll need to switch.

I guess console will popup in MonoDevelop than? I’m not using Visual studio, I’m more of text editor guy, but I must say I kind of like monos layout :smile:

No, in Unity. Debug.Log works no matter what text editor you use.

–Eric

Thanks for the correction.

Does unity strips off Debug.Log when publishing game? Since this function is probably only useful within unity.

Only if you disable “Use player log”, and it’s quite useful outside of Unity.

–Eric