Using C# in Godot with Visual studio code [VSC]

Поділитися
Вставка
  • Опубліковано 31 гру 2024

КОМЕНТАРІ • 91

  • @HyBlock
    @HyBlock Рік тому +54

    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.

    • @guidoopossum
      @guidoopossum Рік тому +1

      Stop. Is it mean I can't port C# game on Android now?

    • @fridyrogide8752
      @fridyrogide8752 Рік тому

      Is godot staffs made 8 millions dollars somewhere, on another program ?? I don't think they need money.....

    • @fridyrogide8752
      @fridyrogide8752 Рік тому

      They still need dedication and devotion, that's for sure

    • @HyBlock
      @HyBlock Рік тому

      @@fridyrogide8752 No idea what you're talking about.

    • @SexyBunnyCoder
      @SexyBunnyCoder Рік тому

      @@guidoopossum 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 ).

  • @ryuu7644
    @ryuu7644 Рік тому +9

    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
      @CocoCode  Рік тому +3

      Thanks! Welcome aboard! 🙌

  • @caeleng5553
    @caeleng5553 Рік тому +4

    I am switching from Unity to godot so glad you are doing the same with your tutorials ❤

  • @fuzzjohn
    @fuzzjohn 11 місяців тому +3

    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".

  • @charlythompson9281
    @charlythompson9281 Рік тому +31

    Great stuff, thank you!! I hope you’ll do more C# for Godot - there aren’t very many out there.

    • @CocoCode
      @CocoCode  Рік тому +15

      For future Godot tutorials I'm planning to show everything in GDScript with alternative C# implementation on the side

    • @RogerDunder
      @RogerDunder Рік тому +4

      I would also love to see more c# for godot.
      Keep up the good job!

    • @Wagnard28
      @Wagnard28 Рік тому +1

      @@CocoCode If possible, a performance comparison might also be interesting.

    • @obinnaokafor6252
      @obinnaokafor6252 Рік тому +2

      Kindly create more of C# code examples. The more C# contents, the more people will be following your channel.

    • @jadsa
      @jadsa Рік тому +1

      Yeah C# would be more interesting for me.

  • @torrescle
    @torrescle Рік тому +8

    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
      @HyBlock Рік тому +1

      You can use C# in Godot.

    • @torrescle
      @torrescle Рік тому +3

      @@HyBlock that's what I'm saying

    • @ReasonMakes
      @ReasonMakes Рік тому

      Unfortunate it can't be used with web though! (Or iOS or Android)

    • @HyBlock
      @HyBlock Рік тому

      @@ReasonMakes I think support for that is added already in development versions, should be coming soon

    • @sologmr9007
      @sologmr9007 4 місяці тому +1

      Wait C# for Godot is faster than its default language? Unpossible😅

  • @chizuru1999
    @chizuru1999 Рік тому

    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.

  • @dancingdoormanable
    @dancingdoormanable Рік тому +2

    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).

  • @Arabian_knight_101
    @Arabian_knight_101 4 місяці тому +1

    Yes finally a perfect tutorial where i can get education instead of yapping
    Do more godot tutorials

  • @CustomClass5
    @CustomClass5 Рік тому +1

    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

  • @animelafuerza
    @animelafuerza Рік тому

    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)

  • @hey77tw
    @hey77tw 8 місяців тому

    This is the best tutorial ever!!!!

  • @alfieskidz8003
    @alfieskidz8003 Рік тому

    Thanks so much. Yours if the only one I have managed to understand and all works now

  • @stoic7810
    @stoic7810 Рік тому

    Extremely valuable video. Thx.

  • @rotrodoni9225
    @rotrodoni9225 Рік тому +2

    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
      @austencoogan6310 9 місяців тому

      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
      @rotrodoni9225 9 місяців тому

      @@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)

  • @Azurly
    @Azurly 10 місяців тому

    UPDATE : With 4.2 and high, you CAN now export your C# project on IOS and Android

  • @aahh437
    @aahh437 Рік тому

    Thank you for the tutorial

  • @SrSproductionsS
    @SrSproductionsS Рік тому +3

    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.

  • @RoeldeB
    @RoeldeB 9 місяців тому

    I would like to see more Godot videos.

  • @ricorazDraa
    @ricorazDraa 3 місяці тому

    ever since i downloaded visual studio and applied it in godot ive been getting a weird error message and it doesnt let me open the script page in godot but only the one in visual studio. do i need to fix the error or will it work just fine using visual studio editor only?

  • @lightning1o140
    @lightning1o140 Рік тому

    I don't have the c# option at 0:33

    • @CocoCode
      @CocoCode  Рік тому

      Please make sure to watch the video from the beginning - I'm covering such issue just after the intro

  • @AGBWBREH
    @AGBWBREH 11 місяців тому

    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?

  • @gaggi3216
    @gaggi3216 Рік тому

    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

  • @ভোমরা
    @ভোমরা 10 місяців тому +1

    thanks man

  • @ashenadeesha21
    @ashenadeesha21 2 місяці тому

    thank you very much sir

  • @Brain.Scrambler
    @Brain.Scrambler Рік тому

    Preciate it 🙏🏾

  • @AshutoshGondole
    @AshutoshGondole 9 місяців тому

    If I download the C# dev kit extension, will it work

  • @Hockets
    @Hockets 7 місяців тому

    What about c++?

  • @goshawk_fly
    @goshawk_fly Рік тому

    Make video how to add Signal's code automaticly in VScode. Pls.

  • @Zadamanim
    @Zadamanim Рік тому

    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
      @CocoCode  Рік тому

      Have you followed the very first step in the video? 0:07-0:22?

    • @Zadamanim
      @Zadamanim Рік тому +1

      @@CocoCode no
      sometimes i am stupid

  • @Alex98776
    @Alex98776 Рік тому

    good video but one question, it is mandatory to download visual studio to start programming

    • @403gtfo
      @403gtfo Рік тому

      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!

  • @MaxIzrin
    @MaxIzrin 6 місяців тому

    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#?

  • @zandpmaster1072
    @zandpmaster1072 Рік тому

    for some reason when I open vscode is won't find the Godot package, "using Godot" is red, can anyone help?

    • @zandpmaster1072
      @zandpmaster1072 Рік тому

      ok I figured it out, in order to make the IDE happy, run the project and then it wouldn't do that

  • @MichaelReyk
    @MichaelReyk Рік тому

    can you edit in c# using the default IDE? instead of visual studio??

    • @asteriadev
      @asteriadev Рік тому +1

      Yes, it can be seen here 0:46, but it only functions like a text editor; no intellisense, suggestions etc. unlike vs code

    • @MichaelReyk
      @MichaelReyk Рік тому

      @@asteriadev using the default is more comfortable and fast, but maybe we should prefer functions over confort and use visual studio anyways...

  • @sajadtroll9186
    @sajadtroll9186 Рік тому

    Yo master Coco. Is gdscript faster than c# to run?

    • @CocoCode
      @CocoCode  Рік тому +1

      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
      @SheepUndefined Рік тому

      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.

  • @op2265
    @op2265 Рік тому +5

    A guide on GDscript would be lovely

    • @403gtfo
      @403gtfo Рік тому

      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 :)

  • @JeffKomarow
    @JeffKomarow Рік тому

    🎉🎉🎉

  • @freepik19nineteen2
    @freepik19nineteen2 Рік тому +1

    Why did you left unity

    • @op2265
      @op2265 Рік тому +5

      Cause unity introduced runtime fees, so a lot of people are leaving unity

  • @milivojesimonovic3942
    @milivojesimonovic3942 Рік тому +2

    Can you make more unity videos pls ?

  • @selimkaptan669
    @selimkaptan669 Рік тому

    👏

  • @tunvas
    @tunvas Рік тому +1

    you are fast

  • @SayedSafwan
    @SayedSafwan Рік тому

    we need GDscript

  • @daniyarm2922
    @daniyarm2922 Рік тому +3

    How infuriating this C# on Godot is ))

  • @Lansamatv
    @Lansamatv Рік тому +2

    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

  • @GloriousReign
    @GloriousReign 7 місяців тому

    GD script is the way stop fighting it

  • @johannes4510
    @johannes4510 Рік тому +5

    Visual Studio for the pros, Visual Studio Code for the noobs

    • @obinnaokafor6252
      @obinnaokafor6252 Рік тому +1

      You can use both for either hubby or professional.

    • @SheepUndefined
      @SheepUndefined Рік тому

      Visual Studio if you want your computer to hang a little every time you pull open a script.

    • @dad8102
      @dad8102 8 місяців тому

      Other way around

  • @LIDOGAMES
    @LIDOGAMES Рік тому

    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.