VSCode vs VS

Hi I just begin to this course. I’m already writing basic programs with VS community 2022 edition so I’m begginer in C# programming.

Now I downloaded VSCode in order to stick with instractions but however I couldnt fix many problems in VScode, even there wasn’t in VS when I downloaded it first time.

In VSCode I already made the platform and basic shapes shown in lecture 4 and later I went to check if I can create new C# console project same as VS but there wasn’t any way to create it so I watched a 5 minute video to solve it, downloaded C# etc. then I was able to do it. But I already having couple problem:

There is no Namespaces shown at top when I’m coding they’re like invisible, but in VS when I code
something it is automaticly detects what class I use and immediately creates "using example " up top.

In VSCode it doesn’t indent correctly and comfortly like as VS community edition , and,
When I try to use " Console.WriteLine(); " its works fine but I dont know why, when I use code snippet " cw ", it comes with System namespace like this : " System.Console.WriteLine(); ".

So I’m not use to using this with namespace. another problem is that when I create new project it doesnt come with main method inside interntal class inside a namespace. Whenever I create a new project in VS there is already ready to use Namespace, internal class etc.

So I Went to see if somebody created a topic for these same problems in Udemy, I found Instructor Nina’s question there, it is very top of the page. I read topics and made some downloads shown there , watched many youtube video but didnt work at all.

If it is gonna come with uncomfort situtations in the future that I cannot fix, I want to ask what if I choice VS community edition 2022 to use with unity instead of VSCode?

Is there an disadvantage to switch VS for using unity? pls let me know if you know anything about this, I need advices. thanks.

Hi Scuza, welcome to the community. I started learning C# by taking the Unity RPG classes. I had installed VS and watched several videos before I realized that the instructor was using VSCode. I have taken 7 or 8 courses since then and have had no problems following along. The only thing I noticed is that I don’t have the issues that other students talk about in the forums. If you are already comfortable with VS you will be fine using it for learning Unity.

2 Likes

Hi Scuza,

Welcome to our community! :slight_smile:

This course has absolute beginners in mind, so Rick also introduces a script editor. He decided to show and use VS Code. However, Unity does not care where/how we write code. If you are familiar with VS, please feel free to use VS. For C#, I use VS. It’s a matter of personal preference.

Since you mentioned that you wrote basic programs (in C#?), be careful not to mix things up. In Unity, Console.WriteLine() does not exist. Of course, you can write that in your code, and if you use the right namespace, it is valid code. However, that code won’t work with Unity because Console.WriteLine() does not exist in Unity.

When creating a new C# script in Unity, Unity’s VS package uses a Unity template to create a new script. Since the Main() method does not exist in Unity, it makes no sense to have that method in Unity. Or to be more precise: The Main() method does exist but it is hidden somewhere in Unity’s source code. We do not see or modify it.

If I understood you correctly, you seem to be confused by “Unity code”, which does not look like C# code for C# console applications. Or maybe I misunderstood you?

1 Like

Thanks for your answer I switched to the VS, and if I weren’t I would probably still working on issues. Working on VS just solved them all.

1 Like

Thx for helping.

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

Privacy & Terms