Unity & Visual Studio: Code & Debug Like A PRO

Sdílet
Vložit
  • čas přidán 13. 09. 2024

Komentáře • 64

  • @WarpedImagination
    @WarpedImagination  Před rokem +6

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

  • @Chrisgonal
    @Chrisgonal Před 6 měsíci +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  Před 6 měsíci +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 Před rokem +8

    I've always thought using debuggers doesn't get enough spotlight in either academia or CZcams 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  Před rokem +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 Před rokem +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  Před rokem +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 Před rokem +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 Před rokem

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

  • @Director414
    @Director414 Před 2 měsíci +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  Před 2 měsíci

      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.

  • @marmikemp3767
    @marmikemp3767 Před rokem +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  Před rokem +2

      Almost? .. get ready for part 2

    • @badscotsman
      @badscotsman Před rokem

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

  • @MrXeniu
    @MrXeniu Před rokem +2

    As always fantastic content

  • @reconnect10
    @reconnect10 Před 6 měsíci +1

    best unity debug tutorial

  • @Shiffo
    @Shiffo Před 4 měsíci +1

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

  • @iainkey5102
    @iainkey5102 Před rokem +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  Před rokem +1

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

  • @mongreldesigns9195
    @mongreldesigns9195 Před rokem +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  Před rokem +1

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

  • @midniteoilsoftware
    @midniteoilsoftware Před rokem +2

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

    • @WarpedImagination
      @WarpedImagination  Před rokem

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

  • @Meowzors
    @Meowzors Před 6 měsíci +1

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

  • @raymk
    @raymk Před rokem +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  Před rokem

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

  • @irf3662
    @irf3662 Před rokem +1

    Thanks for this vid will be implementing these techniques

  • @byrontik1
    @byrontik1 Před 8 měsíci +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  Před 8 měsíci

      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

  • @mailmaxxxx
    @mailmaxxxx Před 9 měsíci +1

    Oh -and one other thing. When it's stopped at a breakpoint you can move the execution point around.
    For example, I had a breakpoint the line after calling a 'loadJsonFromFile' method. I inspected the returned value expecting a list of objects - but it was empty. So I just drag the little red dot up to the method execution line, and step into the code (F11) & I can investigate why that code wasn't working!

    • @WarpedImagination
      @WarpedImagination  Před 9 měsíci

      If I do an extended debugging video I will be sure to scroll through the comments on this video and pull out all the tips others point out.
      Thanks for sharing.

  • @andrewkibor9581
    @andrewkibor9581 Před rokem +1

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

    • @WarpedImagination
      @WarpedImagination  Před rokem

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

  • @kinganime2702
    @kinganime2702 Před 5 měsíci +1

    Thanks! it was really helpful :-)

  • @SharathThe1
    @SharathThe1 Před 8 měsíci +1

    Thanks! Do more!

    • @WarpedImagination
      @WarpedImagination  Před 8 měsíci

      Anything in particular?

    • @SharathThe1
      @SharathThe1 Před 8 měsíci +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  Před 8 měsíci +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 Před 8 měsíci +1

      @@WarpedImagination 🙌

  • @badscotsman
    @badscotsman Před rokem +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! 😃

  • @halivudestevez2
    @halivudestevez2 Před měsícem +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  Před měsícem

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

  • @kevmscotland
    @kevmscotland Před rokem +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  Před rokem

      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/

  • @chichutv2-nt9gl
    @chichutv2-nt9gl Před 11 měsíci

    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  Před 11 měsíci

      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 Před rokem +1

    noice

  • @jaxowaraxa
    @jaxowaraxa Před rokem +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  Před rokem

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

  • @laserbean00001
    @laserbean00001 Před rokem +1

    I prefer VS Code.

    • @WarpedImagination
      @WarpedImagination  Před rokem +1

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

  • @MassimoRough
    @MassimoRough Před rokem +2

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

    • @WarpedImagination
      @WarpedImagination  Před rokem +1

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

    • @raymk
      @raymk Před rokem +2

      More like “Code and debug like a humble person”