Namespaces in Unity

Поделиться
HTML-код
  • Опубликовано: 18 янв 2025

Комментарии • 126

  • @Ratstail91
    @Ratstail91 4 года назад +175

    14 classes.
    "That's an awful lot of class files"
    Me: ...ok

    • @simonspasskiy
      @simonspasskiy 4 года назад +5

      Same

    • @47Mortuus
      @47Mortuus 2 года назад +5

      "When it's this much to work with, it can become a bit overwhelming"
      Me: ...ok

  • @adamodimattia
    @adamodimattia 4 года назад +58

    One of the the most underappreciated Unity channels. Fantastic stuff and great format. Best of luck to you guys, keepe up the great work.

  • @cok3n
    @cok3n 4 года назад +90

    Infallible Code is my new favourite anime :D

  • @alapidis
    @alapidis 2 года назад +24

    What an incredible video format. This sort of 1:1 conversation, keeping it upbeat and honest, discussing the pro's and con's of something casually is exactly the sort of experience one gains from a class or mentor. This video format is excellent! Great job guys.

  • @yayz_
    @yayz_ 2 года назад +4

    This format reminds me of old school instructional videos but modernized. It's refreshing and easy to stay attentive to. Keep up the great work!

  • @martycarr1477
    @martycarr1477 4 года назад +4

    Jason is the patron saint of clean code

  • @racrity
    @racrity 2 месяца назад

    You guys are the best. Thanks so much for all of these series!

  • @BeeGameDev
    @BeeGameDev 4 года назад +6

    Yet again knocking it out of the park with the examples. It's great to have this as a reference that I can send to new coders having problems, without having to worry about them picking up bad habits from the tutorials.

  • @sheppowed4483
    @sheppowed4483 3 года назад +2

    Underrated channel, I am learning c# for unity and you content helps me a lot! Keep going :D
    Hi from France

    • @InfallibleCode
      @InfallibleCode  3 года назад +1

      Hi! I really appreciate your feedback 😄

  • @RomanPapush
    @RomanPapush 4 года назад +2

    I’m loving this format of your videos, terrific job guys! 🙌

  • @ofir9999
    @ofir9999 2 года назад +2

    On the right-click menu I don't see the "Refactor This" button, am I missing something? Maybe an extension to download?

    • @GegeGreenCube
      @GegeGreenCube Год назад

      is a extention called rider, from resharper

  • @gamedevhq
    @gamedevhq 4 года назад +19

    When are we getting a full length feature film of this stellar quality?

  • @kirbymia6209
    @kirbymia6209 3 года назад +5

    I love these conversation style tutorials! They make the concepts stick in my brain.

  • @SHOOTINGDNA
    @SHOOTINGDNA 4 года назад +19

    Thank god... This time it was not Charles calling Charles 😂🤣😂😂

    • @InfallibleCode
      @InfallibleCode  4 года назад +15

      My mental state is starting to stabilize xD

  • @ArgentFox
    @ArgentFox 11 месяцев назад

    Thanks so much for showing how to set the namespace both in Unity and Rider. I was ripping my hair out because Rider kept wanting to create new class files with "DefaultNamespace" instead of the namespace I was manually setting for each file.

  • @ufukseyithan
    @ufukseyithan 4 года назад

    Dude, those game invites in the end of your videos just kill me! Keep up the good work!

  • @daffertube
    @daffertube 2 года назад

    learned about rider because of this video.

  • @logiis6
    @logiis6 2 года назад

    I dont know why, but me being the third person listening to your conversation just feels more natural than standart tutorial.

  • @EmotionTheory
    @EmotionTheory 3 года назад

    I *love* the conversational format of your videos - it is extraordinary for learning such topics. Great work, Charles.

  • @maple7rees-352
    @maple7rees-352 Год назад

    Damn. Treasure trove of unity info. Thank you.

  • @magnusm4
    @magnusm4 Год назад

    I wish a tutor conversation would go this well.
    If I'm being taught then I'll have to ask least 3 question in their first sentence.
    Worst is in school when the answer is "That's not important right now, let's just focus on this."

  • @mracipayam
    @mracipayam Год назад

    I've never seen a greate format like this and sad for finding 3 years later.

  • @tam_69420
    @tam_69420 Год назад

    in case anyone finds this, in order to do what he did in 4:01 you hold ctrl and click the files, this also works with highlighting text, and holding shift has a different yet useful effect.

  • @eugenemigursky9608
    @eugenemigursky9608 4 года назад +11

    People say Leonardo Dicaprio is going to give up his Oscar after he saw Charles and Jason acting :)

    • @DarthStevenus
      @DarthStevenus 3 года назад

      They gonna have to eat a raw fish first.

  • @moduntilitbreaks
    @moduntilitbreaks 4 года назад +2

    Quality as top notch as always.

  • @silvanpaul2531
    @silvanpaul2531 3 года назад

    even tough i knew about namespaces; your video is clear and great!

  • @yadav-r
    @yadav-r 2 года назад

    Oh. wow.. amazing.
    I was working as a game tester, looking forward to switching to game development, I have little coding experience, your videos are very helpful in learning. Thank you very much, sir.

  • @alsharefee
    @alsharefee 4 года назад

    I like how small and informative it is.

  • @yanndetaf5725
    @yanndetaf5725 4 года назад +2

    You just made Amazing job guys. Keep going on

  • @erz3030
    @erz3030 4 года назад +1

    Another great video fellas, keep em coming!

  • @BenightedAlizar
    @BenightedAlizar Год назад

    Glad I stumbled across this! Inspired me to set up proper namespaces for my current project.
    BTW if you are using Visual Studio and don't have Resharper to mass-add namespaces, you can right click (or use your refactor hotkey) above a class name to add an individual script to a namespace as a refactoring action.
    At least for me the property window didn't work, apparently Unity likes to take control of it.
    If you have a ton of scripts, maybe you could open the properties by closing Unity first; I didn't try it.

  • @paulopatine
    @paulopatine 4 года назад +1

    Much better than Netflix

  • @brockormond4131
    @brockormond4131 4 года назад +5

    Okay, I'm in the middle of a project that didn't start with a root namespace and I'm using Visual Studio for my editor. I was able to change the root in Unity following the video, but not in VS; so my scripts haven't changed. Do I have to do that manually in this case or is there a faster way?

  • @lokiorphen
    @lokiorphen 4 года назад +3

    hi , I recently follow another project with Unity 2019.4.1f1. I'm trying to add a script component but it can't be applied because it has a namespace therefore the file name doesn't match to the class name . I've tried to resharper/refactor it and adjust namespace but there is no those options in my visual studio 2017. I was wondering if you could give me a suggestion for this problem (or anyone has a solution ). I will be grateful .

  • @farianderson168
    @farianderson168 Год назад +1

    so now instead of interactables namespace you have to use core namespace in the key class right ?

  • @dynasticc
    @dynasticc 3 года назад +1

    i noticed you use rider, maybe we could get a video on why you prefer it over VS?

    • @midniteoilsoftware
      @midniteoilsoftware 3 года назад

      at the very least, I'd like to know if there is an equivalent shortcut to "refactor this" in VS?

  • @Tymon0000
    @Tymon0000 3 года назад +2

    How to skip "Scripts" or "Assets" names when automatically switching namespaces?

  • @SqrlyCode
    @SqrlyCode 4 года назад +1

    Amazing informative and packed Content! Kepp up the amazing work!

  • @chrisball249
    @chrisball249 4 года назад +2

    Does the Core folder have namepace InfallibleCode.Core? Doesn't this produce the same problem?

    • @farianderson168
      @farianderson168 Год назад +1

      I think the answer is at least the two namespaces interactables and keypad are separate now so you can have separate assemblies for each and changing one namespace wouldn't need the other to recompile, that's the benefit.
      of course changing the core namespace would need the other two both to recompile cause they should reference to it but the overall compile time will be reduced and the readability of the code will be increased.

  • @Kramlets
    @Kramlets 4 года назад +1

    I recently made a Python script to remove all the namespaces from my files after doing research that using namespaces weren't really needed.
    Note that this wasn't any layered namespaces, just a single root namespace for everything.
    And yes, it definitely made me feel more legit to use a namespace lol.
    It feels like something that should be done at the end of a project's life, during the optimisation phase. I didn't know it could speed up compile times. That *might* be useful if I'm building a lot, though I can imagine it would be a pain to manage.

  • @ClutchGen
    @ClutchGen 3 года назад

    This is fantastic, thank you Jason and Charles (Barles?)!!

  • @lmao01
    @lmao01 4 года назад +4

    Thanks for these videos.
    It would really be useful to see a tutorial how to organize code and folders so they can work with assemblies. You touch in this video very briefly on this.
    Maybe few examples how to split code when there are recursive references in assemblies.

  • @noodle-eater
    @noodle-eater 4 года назад

    your videos is awesome, this is really a skill that is used in the game company

  • @MrWursteimer
    @MrWursteimer 4 года назад

    I really like those videos. I learned a lot from them. Thank you!!

  • @GallDeveloper
    @GallDeveloper Год назад

    Tego właśnie szukałem :p

  • @experiFilm
    @experiFilm 3 года назад

    Hmm for some reason the project properties doesn't appear. It just refreshes an empty properties window. I'm using visual studio 2022

  • @sagiziv927
    @sagiziv927 4 года назад +1

    Amazing video, I have learned so much from it. Very informative and well explained. Immediate like👍

  • @relixgames9425
    @relixgames9425 4 года назад +6

    Hey m8. Just dropping in to say that I found you because of one of your ads. So, you at least got someone out of it.

    • @InfallibleCode
      @InfallibleCode  4 года назад +1

      Thanks for dropping by. I’m glad to hear those ads are a working lol Enjoy the content!

  • @alpercaner2923
    @alpercaner2923 4 года назад +2

    adjust namescapes creates namespace like _Project.Scripts.FolderName.SubFolderName :(

    • @wyworak
      @wyworak 3 года назад

      They show how to solve your problem in this video: ruclips.net/video/pfiZVTDhWyM/видео.html

  • @InProductionsrodLove
    @InProductionsrodLove 4 года назад +1

    I tried to view the properties on the assembly and it doesnt do anything. And it wont let me right click refactoring of namespaces the option isnt there. What do I need to do?

    • @chrisrush841
      @chrisrush841 4 года назад +2

      It's only available in the Rider IDE or if you have ReSharper installed in Visual Studio. It would've been nice if they had mentioned that this functionality required Rider or ReSharper, and that neither option is free.

  • @UNIQUERAGE1
    @UNIQUERAGE1 3 года назад

    You are a pair of chads, thank you so much

  • @dfghj241
    @dfghj241 Год назад

    do you NEED to separate then by a folder? no right?

  • @unitygamedeveoper009
    @unitygamedeveoper009 2 года назад

    Hello there. What if i simply want to call function from another in this "Name space using script" ??? Help me

  • @RobLang
    @RobLang 4 года назад +1

    Great video. Wish that C# had an access modifier that allow you to restrict to current namespace and child namespaces. It would allow me to be much more distinct about where domain entity boundaries were.

    • @bbrainstormer2036
      @bbrainstormer2036 11 месяцев назад

      It has something like that for assemblies

    • @RobLang
      @RobLang 11 месяцев назад

      @@bbrainstormer2036 absolutely - however the issue with separating assemblies is you can quickly get into circular reference issues. I want more granular control within a given assembly.

  • @rohitdoestech
    @rohitdoestech 4 года назад +1

    nice to see rider

  • @richnaisanze
    @richnaisanze 4 года назад +1

    I always asking why should I use namespaces, here's 2 awesome dudes tell me about the answers. Really nice approach to tell people what namespaces is... Thanks

  • @InfallibleCode
    @InfallibleCode  4 года назад +1

    📦 Download the code at www.patreon.com/posts/36164698

  • @sufianahmad7337
    @sufianahmad7337 4 года назад +2

    well explained

  • @Tymon0000
    @Tymon0000 3 года назад

    I got 600 classes and I'm halfway through the project :D

  • @valerii-barabanov-vvb
    @valerii-barabanov-vvb 3 года назад

    And you can switch Namespace provider option in Folder Properties to tweak automatic namespace refactoring.

  • @yousefabodeif5677
    @yousefabodeif5677 4 года назад

    Thanks a lot man!

  • @happybadger2270
    @happybadger2270 2 года назад

    does this work in vscode as well?

  • @artohaapanen7764
    @artohaapanen7764 4 года назад

    Which code editor do you have in use?

  • @yazuki-wolf
    @yazuki-wolf 3 года назад

    very interesting video. so.. um.. what's a namespace?

  • @brockormond4131
    @brockormond4131 4 года назад

    The C# Assembly is not showing up in my Solution window... where is it?

  • @MsSnoozable
    @MsSnoozable 3 года назад

    Was there a video talking about why we want all of the unity scripts in a defined root namespace? Isn't the whole point of namespaces so you can access the definitions easily.... Why would you need to do that for a Unity project? (He just says "charles told me to do that so all my code can live under the same namespace"). I get the setup bit is so that new scripts created automatically start with that root namespace, but why do I even need one???!

  • @pcbuilderindia4104
    @pcbuilderindia4104 2 года назад

    Amazing

  • @ebrahimkarimi1388
    @ebrahimkarimi1388 3 года назад

    Thanks for your top-quality videos. But I wonder why your videos have so few likes. This is not their right.

  • @omerfarukbykl6097
    @omerfarukbykl6097 4 года назад +1

    do you do this bad casting intentionally?

  • @cuttlas2955
    @cuttlas2955 4 года назад

    thank u very good video

  • @darkdoom907
    @darkdoom907 2 года назад

    Why is his right click and my right click so different?

  • @Holzf43ller
    @Holzf43ller 4 года назад

    I saw this video and a few others of yours. then i started my project.
    But now i want to add other folders and i cant. Whenever i try to add a new folder and C#-Files in it they are not recognized in Rider.
    No intelisence, nothing.
    So i am back to square one needing to put every new file in one of my existing folders.
    So in the bottom line this made everything kind of worse.
    Irewatched this videosand others with thisd topic again and again but i did not find my error.
    And this is kind of ... not good.

  • @Inf4mousKidGames
    @Inf4mousKidGames 3 года назад

    i need to know the end card music

  • @restushlogic5794
    @restushlogic5794 Год назад

    How about visual studio 2022?

  • @pansammi2184
    @pansammi2184 2 года назад

    this video reminds me of those very very old english learning videos for non English speakers, this role play thing hahahahaha

  • @RogelioIturra
    @RogelioIturra 4 года назад

    Thanks!

  • @Blu3W4r10Ck
    @Blu3W4r10Ck Год назад

    So this requrires Rider/Resharper? I think Resharper is 139.00 USD for individuals...

  • @unorthodocs1103
    @unorthodocs1103 4 года назад

    I love how these are setup. I can follow along and listen as its explained to the reasoning why these are done the way they are.
    Keep up the awesome work man.
    Also just a heads up in your Information panel under your favorite assets you have a link reflecting the same page as another.
    Editor Console Pro's link is directing to the page for Rainbow Folders 2.

  • @TectonicPlate
    @TectonicPlate 4 года назад

    Came for the code, stayed for the plot

  • @BDtetra
    @BDtetra 3 года назад

    hmm, shouldn't Doors and Keys also be in Interactables? As in InfallibleCode.Interactables.Doors and InfallibleCode.Interactables.Keys ??

  • @darkdoom907
    @darkdoom907 2 года назад

    what code editor is this?

    • @RintarouOkabe9
      @RintarouOkabe9 2 года назад +1

      Apparently is Jetbrains Rider, and has not free version :(

    • @darkdoom907
      @darkdoom907 2 года назад +1

      @@RintarouOkabe9 thanks kyouma kun

  • @Bylem_
    @Bylem_ 4 года назад +14

    What a roleplay hahah

  • @diplodocus3
    @diplodocus3 4 года назад

    you used Chris Heria music?

  • @Visuwyg
    @Visuwyg 3 года назад

    I appear to have some namespace issue in my project, but this video didn't really teach me what they are. I like the format though, it's basically artist me and my programmer friend.

  • @experiFilm
    @experiFilm 3 года назад

    I wish I would've known.. I'm using folders but I have 63 scripts now and it's taking like 3 minutes to recompile between every script change. >.

  • @anlumman3897
    @anlumman3897 3 года назад

    Oh hi Mark.

  • @Ziplock9000
    @Ziplock9000 Год назад

    Meanwhile, in the real world.... This falling into the same problem as Brackys videos

  • @troshto
    @troshto 4 года назад +1

    Has Jason made a RUclips channel yet??

  • @diplodocus3
    @diplodocus3 4 года назад +1

    haha, great one!

  • @diliupg
    @diliupg 4 года назад +1

    Jason looks like your bro.. :)

  • @UnityVR
    @UnityVR 4 года назад +1

    I had a code smell once

  • @hamsoft23
    @hamsoft23 2 года назад

    No entendí nada pero está muy bien

  • @LostSockDrawer
    @LostSockDrawer Год назад

    reminds me of mod ash

  • @paulogodinho3275
    @paulogodinho3275 4 года назад +3

    Does a minor mistake:
    *OOF*

  • @nauka9634
    @nauka9634 3 года назад

    Film noir

  • @fille.imgnry
    @fille.imgnry 9 месяцев назад

    ..and this is how you never finishe your game project 😂

  • @toystoryscarymovie-forkids3323
    @toystoryscarymovie-forkids3323 2 года назад

    too much grammer not beginner friendly

    • @lotussy7698
      @lotussy7698 2 года назад

      not everything has to be beginner friendly :)
      It was perfect for me^^

  • @INeatFreak
    @INeatFreak 4 года назад +4

    It's a bit cringe

    • @InfallibleCode
      @InfallibleCode  4 года назад +9

      Let’s be honest - it’s a LOT of cringe lmao but I had fun making it and people seem to like them!

    • @alexmobile5547
      @alexmobile5547 4 года назад

      ​@@InfallibleCode No! this is, by far, the most in depth tutorials i have found on youtube. Most people just slap a huge monolithic class and say , "congrats! you made a game! Game dev is easy! Go make your own game." Its easy to make tutorials with buzzwords and click bait titles for views.
      You, on the other hand, showed me how to future proof and create scale-able code. Yes, it looks cringe and stupid but it works , so, its not cringe and stupid.
      You choose to support developers that were on the verge of insanity because they didnt know how or why their code failed. I dont care if you upload 2 hours long videos of you talking to your self. Your Tutorials are DEADLY.
      Every time my project grew in size and complexity and the frame rate "Tanked" like Tiananmen square, You were there to tell me not to be afraid. You and your Schizophrenia kept me from quitting all together. Calling ​Infallible Code cringe is like calling Mother Tereza cringe because she fed the poor and helped those in need...
      All that you say, you are helping people. A lot! that can never be "cringe" in my books.
      Ps Sorry if my comment is a bit incoherent but i haven't slept for 30+ hours.

  • @pinkaltercation
    @pinkaltercation Год назад

    STOP WITH THE CRINGE ACTING HOLY