Using C# in Godot with Visual studio code [VSC]
🎁 Support CC and DOWNLOAD finished Unity project: www.patreon.com/posts/9020085...
In this comprehensive tutorial, dive into the world of C# scripting within the Godot game engine. Designed with Unity developers in mind, this guide facilitates a seamless transition. Discover step-by-step instructions on setting up your preferred IDE, Visual Studio Code, crafting C# scripts, and accessing them effortlessly. Plus, gain valuable insights into taking those crucial first steps towards harnessing the power of C# in your Godot projects. Elevate your game development skills today!
--------------------------------------------------------------------------------
🔗 LINKS IN THIS VIDEO:
Godot engine download: godotengine.org/
Visual Studio Code download: code.visualstudio.com/download
JSON Snippets (launch.json/tasks.json): cococode.net/courses/how-to-u...
--------------------------------------------------------------------------------
👨💻 SOCIALS:
💜 Join our Discord: / discord
🔵 Follow me on Twitter: / cococodeyt
--------------------------------------------------------------------------------
🎓 YOU WILL LEARN:
- How to install Visual Studio Code
- How to use C# width Godot engine
- How to connect button signal with the script
- How to change label/text in Godot using script
- What are the upsides and downsides of C# support in Godot
--------------------------------------------------------------------------------
⚙️ VIDEO CHAPTERS:
0:00 - Intro
0:07 - Setup C# with Godot
2:57 - Godot with C# basics
4:59 - C# Debugging
6:16 - Worth knowing and tips
Пікірлер: 91
C# support for android is coming really really soon, also the Terraria devs just donated 100k to godot so I expect development to ramp up fast! Exciting things are coming.
@guidoopossum457
10 ай бұрын
Stop. Is it mean I can't port C# game on Android now?
@fridyrogide8752
10 ай бұрын
Is godot staffs made 8 millions dollars somewhere, on another program ?? I don't think they need money.....
@fridyrogide8752
10 ай бұрын
They still need dedication and devotion, that's for sure
@HyBlock
10 ай бұрын
@@fridyrogide8752 No idea what you're talking about.
@SexyBunnyCoder
10 ай бұрын
@@guidoopossum457 for a mature support of C# on all platforms, you should stick to Godot 3.x series until 4.2 is shipped ( and tested enough ). But it's unlikely that a new project on Godot 4 would be ready to publish on Android before the C# support is here ( a matter of weeks, it seems ).
Just read this on the Godot website: "With the recent release of Godot 4.2, projects that use C# can now export to Android and iOS".
I am switching from Unity to godot so glad you are doing the same with your tutorials ❤
I just discovered your channel holy I wish I had a long time ago, thank you so much for making these, the videos are animated so well and they are so easy to understand. Literally can't thank you enough.
@CocoCode
10 ай бұрын
Thanks! Welcome aboard! 🙌
Great stuff, thank you!! I hope you’ll do more C# for Godot - there aren’t very many out there.
@CocoCode
10 ай бұрын
For future Godot tutorials I'm planning to show everything in GDScript with alternative C# implementation on the side
@RogerDunder
10 ай бұрын
I would also love to see more c# for godot. Keep up the good job!
@Wagnard28
10 ай бұрын
@@CocoCode If possible, a performance comparison might also be interesting.
@obinnaokafor6252
10 ай бұрын
Kindly create more of C# code examples. The more C# contents, the more people will be following your channel.
@jadsa
10 ай бұрын
Yeah C# would be more interesting for me.
Thanks so much. Yours if the only one I have managed to understand and all works now
This video on C# in Godot was sorely needed. Hopefully you do a follow up where you get the Business Logic of a game from a C# library. I could then share code between Unity and Godot. There would be specific project files for building the project as Godot and Unity use different .Net versions (Godot's version is newer), but the C# code would be the same. It's an application of the MVC pattern and somewhat similar to Entity Framework's DataContext servicing Plane Old Class Object's (POKO's).
YES i've been trying to do this for HOURS but it keep just NOT WORKING so THANK YOU for posting code snippets on your website that is HUGE THANK YOU
This is the best tutorial ever!!!!
Extremely valuable video. Thx.
People moving from Unity maybe think about GDScript. But they have to taken in account that GDScript only works with Godot. With C# you can work with anything. Plus C# is way way faster.
@HyBlock
10 ай бұрын
You can use C# in Godot.
@torrescle
10 ай бұрын
@@HyBlock that's what I'm saying
@ReasonMakes
8 ай бұрын
Unfortunate it can't be used with web though! (Or iOS or Android)
@HyBlock
8 ай бұрын
@@ReasonMakes I think support for that is added already in development versions, should be coming soon
Gotta say, this setup for debug is 10 times better than the one included in the original documentation (or even in the C# plugin for godot)
Thank you for the tutorial
c# in godot will make it more popular and amazing as its a great language and also is used in unity. People won't have to think twice before switching.
UPDATE : With 4.2 and high, you CAN now export your C# project on IOS and Android
thanks man
I would like to see more Godot videos.
Preciate it 🙏🏾
Careful folks. I just ran into a killer bug. I linked my Godot to my VS like in the vid and it locked up my project. After I went to disable it I can't use my project anymore. I can create a new project or use any other projects just fine. I was using this project before linking my VS as well. Make sure to be careful and back up your goods. I'm making a new project and gana try my hand once more. I am trying to use Raylib with Godot. To anyone who has tried it out let me know! I Can't find anyone online mentioning it. Great vid btw!
Got a question. When I create a c# script there is no class name. It says not available. Is this a problem and how can I fix it, because in the video the class name is N/A. Thanks for help
If I download the C# dev kit extension, will it work
The problem of signal connect is not working properly in Godot v4.1.1 IDE and totally not showing up under Visual Studio Code. This problem held in 2017, 2021 and now 2023, the same problem still there. This is not features but Godot minor toolchain issues, hopes the plugins and Godot updates the support to mobile and web soon.
Hey! Whenever I type in GD.Print("Whatever"); nothing shows up in the console. I've made sure that it's not being filtered out too! Any ideas?
Make video how to add Signal's code automaticly in VScode. Pls.
What about c++?
Hey, I have a problem when I try to make the console print "Hello world!", the program tells me: "Cannot instance script because the associated class could not be found. Script: 'res://control.cs'. Make sure the script exists and contains a class definition with a name that matches the filename of the script exactly (it's case-sensitive)" and it doesn't print it... Also, even after I installed the C# official extension of Visual Studio Code, the program doesn't suggest me anything yet (I installed it like 15 minutes ago). Could anyone help me? PD: When I create a new C# script, the program tells me "Failed to create C# project", I don't know if it has something to do with this.
@austencoogan6310
4 ай бұрын
I know this comment is 4 months old but I'm havng the same issue. Did you ever figure out how to fix it?
@rotrodoni9225
4 ай бұрын
@@austencoogan6310 yes, if my memory serves me right, the problem was the .NET extension. The versión of .NET you have to install is .NET6 ONLY (My problem was that i had another version of the .NET extension apart from the .NET6, so I solved it reinstalling everything from the start)
for some reason when I open vscode is won't find the Godot package, "using Godot" is red, can anyone help?
@zandpmaster1072
9 ай бұрын
ok I figured it out, in order to make the IDE happy, run the project and then it wouldn't do that
good video but one question, it is mandatory to download visual studio to start programming
@403gtfo
9 ай бұрын
As a programmer for 12 years, the answer is no. I am not gatekeeping. you can do amazing things with a simple text editor and I highly recommend you use a bare bone simple one while you start to learn your first programming language. Once you have the basics down (vars, types, loops, functions, arrays, objects, classes, states, and data IO) and have created a few super small learning projects, then have a look at VS code. Advanced editors like Vs code will make programming 9999 times easier and better to work with but it will stunt your learning growth when you are just starting out especially if your editor is giving your snippets and assistance. Best to have a core grasp of the basics first then when you get to the new editor it will be amazing. As a programmer, your comprehension and creative solutions to complex problems are what is valuable. Keep at it! Build something awesome!
can you edit in c# using the default IDE? instead of visual studio??
@asteriadev
10 ай бұрын
Yes, it can be seen here 0:46, but it only functions like a text editor; no intellisense, suggestions etc. unlike vs code
@MichaelReyk
10 ай бұрын
@@asteriadev using the default is more comfortable and fast, but maybe we should prefer functions over confort and use visual studio anyways...
0:30 Using Godot 4.1.1 on Windows 10, does not give me the option to create a new C# script, only GDscript... anyone know why?
@CocoCode
9 ай бұрын
Have you followed the very first step in the video? 0:07-0:22?
@Zadamanim
9 ай бұрын
@@CocoCode no sometimes i am stupid
I don't have the c# option at 0:33
@CocoCode
7 ай бұрын
Please make sure to watch the video from the beginning - I'm covering such issue just after the intro
Yo master Coco. Is gdscript faster than c# to run?
@CocoCode
10 ай бұрын
According to Godot documentation C# is way faster (x4) - but that may be a bit outdated due to recent GDScript improvements in Godot 4
@SheepUndefined
9 ай бұрын
Gdscript is an interpreted language, so there's always going to be a small overhead involved with that that isn't present in C#. I don't see it overtaking C# any time soon, but with the new changes, gdscript is fine for most instances.
I tried using GDScript, and it reminded me of all the reasons I hate Python (which apparently it's a fork of?!). Is there any advantage to GDScript over C#?
🎉🎉🎉
👏
I really like how much attention Godot got in the last few weeks due to Unity's bad pricing plan. This shows that Godot was always next in line to Unity, yet still people chose Unity more based on the community than feature support.
Why did you left unity
@op2265
10 ай бұрын
Cause unity introduced runtime fees, so a lot of people are leaving unity
A guide on GDscript would be lovely
@403gtfo
9 ай бұрын
1. Open the Editor Settings. 2. Select Text Editor > External. 3. Make sure the Use External Editor box is checked. 4. Fill Exec Path with the path to your VS Code executable mine was C:\Users\USERNAME\AppData\Local\Programs\Microsoft VS Code\Code.exe 5. Install the godot-tools pluging in VS code 6. Restart everthing Should work the same as in this video :)
you are fast
we need GDscript
How infuriating this C# on Godot is ))
Can you make more unity videos pls ?
@hingedevoper69
10 ай бұрын
not a very good time for that
please the tutorials in GDScripts please, can you make a tutorial on life bars, mana, exp, more in-depth on the topic of the UI please
GD script is the way stop fighting it
Its not easy to start from beginning. Unfortunately they are going to pay whether they like or not. Its just matter of adjustment to the policy because its insane. Although 200K is too much for indie developer specially on game basis and not account. I will delete the game if it has 200K and problem solved LOL. Joking! What cents matters to U if U got 200K? Team Got no Excuses Too. They can make more games than individuals each year which means 200K * # "Each Year" which is insane too.
Visual Studio for the pros, Visual Studio Code for the noobs
@obinnaokafor6252
10 ай бұрын
You can use both for either hubby or professional.
@SheepUndefined
9 ай бұрын
Visual Studio if you want your computer to hang a little every time you pull open a script.
@dad8102
3 ай бұрын
Other way around