Console.WriteLine does not work?

Hello!

When going through lecture 16, I paused and persevered for 15 minutes, trying to make it work, before I realized it wouldn’t work with Console.WriteLine.

I was just wondering: why doesn’t Console.WriteLine() work with Unity?

Thanks :slight_smile:

Hi,

I’m relatively new to programming in general so if anyone thinks that my explanation is ****, feel free to correct me.

The way I see it is that Console.WriteLine (System.Console.WriteLine) writes to the console used by console applications, which I think is only available in console applications.

The Unity console window is something entirely different from the console application console, which would explain why Console.WriteLine doesn’t write to it.

There does seem to be a way to reroute Console.WriteLine to the unity console but testing this is beyond my current understanding.

I hope this was of any use,

Cheers!

2 Likes

Privacy & Terms