Unity & Visual Studio: Code & Debug Like A PRO

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

КОМЕНТАРІ • 64

  • @WarpedImagination
    @WarpedImagination  Рік тому +6

    See the description for all the documentation links, assets links and ways to support the channel .. and thanks for watching

  • @Chrisgonal
    @Chrisgonal 8 місяців тому +7

    Dude, don’t mind the comments saying this is too basic or that you should pay for a better IDE. This information is GOLD. Most unity tutorials just stick to the Debug.Log and that’s it. Thank you for sharing all of this! I didn’t know half of what you showed.

    • @WarpedImagination
      @WarpedImagination  8 місяців тому +1

      Well I am glad you enjoyed it .. let me know if any areas stand out as something you would like me to delve more into in the future

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

    I've always thought using debuggers doesn't get enough spotlight in either academia or UA-cam so props for having video around this. It's like top 3 most important skills for any programmer to have, yet, most go about it just debug logging until the end of the universe.

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

      I have been wanting to get something together for a while to address debugging .. I might do a follow up down the line digging in further

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

      I must admit I didn’t realise that most people didn’t know how to add breakpoints and use the debugger!
      It’s one of the first things I learned when I started coding professionally *cough* many *cough* years ago!

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

      I find that a lot of developers who start to learn to code with Unity don't learn to use the debugger. Those that learn to code up stand alone applications nearly always learn the debugger as well

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

      @@WarpedImagination yes I can see that. I suspect also a lot of courses these days start by teaching javascript and so debugging by logging to the console

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

      @@iainkey5102 i mean you do have kinda proper debugging tools in chrome too, but yeah..

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

    This is the first time I've seen literally anyone use almost the full power of Visual Studio community X Unity. VSCommunity FTW.

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

      Almost? .. get ready for part 2

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

      Yup, VS2022 is a fantastic IDE (I've been using VS for 15 years, so I have some bias). Unfortunately, some people today are under the impression they'll pay for a Rider license, and like magic, their code and dev/debug experience with Unity is unparalleled. 🙄 It takes time and understanding the tools and features of your IDE of choice before any magic occurs. 😊

  • @reconnect10
    @reconnect10 7 місяців тому +1

    best unity debug tutorial

  • @Director414
    @Director414 3 місяці тому +1

    Great video thanks!!
    I want an in depth tutorial on assembly definitions. A shallow one is redundant, but a medium to large sized project with real life examples would be awesome! Even more Debugging videos would also be awesome! :)

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

      Glad you liked the video, I have been planning on revamping my shared libraries which use assembly definitions and when I do make a video on them .. just been distracted with making a game and the dev logs for it. It will happen though.

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

    As always fantastic content

  • @Meowzors
    @Meowzors 8 місяців тому +1

    I've been using Visual studio since 2017 and just learned what the intermediate window does

  • @Shiffo
    @Shiffo 6 місяців тому +1

    Wow, this is extremely helpfull for debugging! Thank you so much

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

    "All those tab-a-holics out there... " I feel seen! 😂
    Great video as always, you've reminded me that I really should add more code snippets for commonly used tasks! 😁

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

      I would be lying if I said I dont look up sometimes I realize I might have the whole project open

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

    Here are some tips you didn't include in the video:
    *Text Editing:*
    - Ctrl+x to delete a line instead of Backspace button that is a bit awkward to press continuously. Moreover, Ctrl+x cuts the text, so you can paste the text again if you changed your mind.
    - Home/End to move to the start or end of the line. Combine this with Shift, and you can select from the position of your cursor to the start/end of the line.
    - Ctrl+Shift+ArrowKey to select the whole word instead of pressing the ArrowKey multiple time.
    - DoubleClick to select a word, or TripleClick to select the entire line.
    - Alt+ArrowKey (up or down) to move a line up or down. Useful when you want to get codes in/out of a pair of brackets without pissing off the error debugger that always reminds you how stupid you are for failing to remove the two brackets at the same time.
    *Visual Studio:*
    - Multi-Cursor to write texts in different location simultaneously.
    - Turn lines into comments. I forgot the default shortcut key for this.
    - Ctrl+t to find a class from the entire project. I don't know how this feature differs with Ctrl+q, but Ctrl+t is only for classes, I guess.
    - Tabs can be displayed vertically, pinned, and colored as you wish. Great for those who like tabs!

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

      Excellent extras .. will have to check out the vertically tabbing

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

    Thanks for this, learnt a few new things but also got validation that some of the things I do aren't just my stupid way of doing it.
    +1 for a video on code assembly definitions and shared libraries.

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

      Great to hear .. yep assembly definitions are right up there with debugging for tutorials you dont often see

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

    Thanks for this vid will be implementing these techniques

  • @byrontik1
    @byrontik1 9 місяців тому +2

    Great video, did you happen to make one about setting up assembly definitions in Unity? I would be interested to learn more about this.

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

      Not yet .. its a longer format video that I haven't gotten around to producing, I want to tie it into making your own libraries of code and resources.
      Time has not been my friend lately

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

    Very nice Dave. Maybe do a follow-up video showing equivalent commands/shortcuts for Rider.

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

      If Rider are listening and fancy sponsoring a video then please do get in contact

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

    This was quite informative. I don't like many tabs but the peek area usually feels too small for me.

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

      Agreed .. but it is resizable (and it remembers) .. I admit though I do get neck deep in tabs on occasion

  • @kinganime2702
    @kinganime2702 7 місяців тому +1

    Thanks! it was really helpful :-)

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

    If you release a game using VS Code or VS Community - is there any licensing concerns we should be aware of given its effectively "Commercial use"?

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

      As with all software it's always good to read through those boring ever changing license agreements. There are individual and organizational licenses available visualstudio.microsoft.com/license-terms/vs2022-ga-community/

  • @halivudestevez2
    @halivudestevez2 2 місяці тому +1

    my projects does not load properly with VS 2022. I previously edited them with vscode... should I delete some dirty? bad files?

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

      Check Preferences > External Tools > External Script Editor is set correctly

  • @SharathThe1
    @SharathThe1 10 місяців тому +1

    Thanks! Do more!

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

      Anything in particular?

    • @SharathThe1
      @SharathThe1 10 місяців тому +1

      @@WarpedImagination recently imported a bunch of models and hundreds animations with it. had to create a new animator controller with a 'blueprint' for all characters (non-human), create avatar, duplicate the motion (so i can modify keys) and manually move them to new folders. quite a tedious undertaking.
      at least managed to make a quick and dirty helper script where i would assign all the anim clips, ac and avatar. it finds AC's animation state names that matches clip field name (used reflection) because i want the clip file names to remain the same as original. and assign AC and avatar to the animator.
      I have limited experience with mechanisms and some of these steps may be redundant but would love to see a tool that streamlines this process
      tl;dr: anything that deals with importing animation assets

    • @WarpedImagination
      @WarpedImagination  10 місяців тому +1

      Good to know .. I have done a fair number of these for different games because as you say its pretty tedious.
      I will add the video idea to the list .. thanks

    • @SharathThe1
      @SharathThe1 10 місяців тому +1

      @@WarpedImagination 🙌

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

    Update on Visual Studio for Mac. Microsoft recently announced that it will be discontinuing the Visual Studio for Mac IDE. According to the company, the latest version of the IDE will be supported for another 12 months and will officially retire on August 31, 2024. So... VS Code for all the Mac users! 😃

  • @chichutv2-nt9gl
    @chichutv2-nt9gl Рік тому

    bro wheen i double click on script and shift on visual studio there is no any writtent function is show ther like , unity engine and unity collection

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

      Double check the unity plugin in Visual Studio and the Visual Studio package in Unity is imported and up to date.
      That would be my first place to look.

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

    noice

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

    NIce content as always but for me a little too basic as for this channel. I'm little disappointed I don't really learn nothing new. ;) Also Rider FTW.

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

      Then I will just have to find something new in September .. sure I have something sitting in the toolset

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

    I prefer VS Code.

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

      With the latest extensions it's becoming a good package so I can see why

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

    Using VS is more like “Code and debug like a noob”. Have you heard of rider?

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

      This video is more on the default free option set with Unity. Rider is a fantastic IDE.

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

      More like “Code and debug like a humble person”