Visual Studios 2017 and Unity 2017.2.0. Console not printing

Hey guys, having a huge problem right now with unity 2017.2.0 and visual studios 2017. I have linked both and VS is my main IDE. I have created the script like in the video and every box is ticked, the game object is attached. I have gone through every solution and my should work but i cant see anything in the console window no matter what i do, i have research for hours and tried every solution.

I quickly download unity 4.6.9 and completed the exact same process and everything prints to the console window perfectly fine just like in the video but for unity 2017 it doesnt.

anyone have any ideas? is the VS console used instead? i cant find that either

Hi,

Could you post your code and also provide a screenshot from Unity, also, just to check, which version of Unity are you referring to? The topic says “5” but your post says “2017”, if you could confirm.


See also;

hey sorry i was in a rush to go to work :frowning: i am using unity 2017.2.0.

i attached a gif

Hi,

The problem is your code.

You are using;

system.console.writeline()

For Unity, you need to use;

Debug.Log("Hello World!");

or, as per the course materials, you can use;

print("Hello World!");

I’d personally suggest using the former.

Hope this helps. :slight_smile:

wow rob thank you so much for your help, i spent so long trying to find a solution.

Does this mean many other C# syntax are different when in unity or is it only console?

1 Like

I’m not sure that it s necessarily different. The code you had would be fine for a console application, e.g. in Windows running a command prompt and launching it etc, something you might run from Task Scheduler, that kind of thing.

In Visual Studio, had you made a console application the project/solution configuration would be different and launch from Visual Studio would had fired up the console app and displayed your text.

I’ve not personally come across anything else, but then I’ve not really looked for it.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms