Every single interesting thing that I have heard about recently you make a video on like a week later. You are literally predicting what I want to learn next. Legend!
@@Tarodev There actually was a person outside my window a few hours before I wrote that. And it wasn't my neighbors cause they are always loud and talking when they go by. Creepy bro! lol
@@SpicyMelonYT Ah no worries, it's normal too see programmers foraging outside in ya garden around this time of year, just give him a cuppa of joe and he will bugger of on his own. else, sprinkle your garden with invitations to sprint meetings and mails from projectmanagers / IdeaGuys with "the next big thing" to keep your garden guaranteed programmer free
This was a rollercoaster of me shaking my head and nodding. Makes a static class called extensions, adds a method to it and calls if from the class. *face palm* Immediately turns the method into a proper extension method. Redeemed. Makes an extension method to return a random from a list of strings. *face palm* Immediately makes the method generic. Redeemed. You're a true legend.
Man, I love this channel. You are creating content right in my level of skill. I can follow everything easily, but you keep on showing me things that are new/useful. Thanks for the vid!
I am still pretty new to game development (I've been doing it for about 9 months now). This channel is absolute gold. I can't tell you how many times I have thought to myself "I wish this was a method I can call". For me, the hardest part is keeping things nice and tidy (I tend to make waaay to many scripts and I start getting lost in them). This is definitely a neat trick and I will 100% use it in the future. Thank you!
Was about to skip this since I thought I already knew what extension methods were. Turns out I did not. It's absurd how much a ten minute video can help you in your career. Thanks a bunch!
I noticed it in this video and a bunch of other video of you as well. Your Unity compiles and enters playmode ridiculously fast. For playmode enter I know you can disable scene and domain reload but I have run into problems with that once before. I would love a video on how to improve the speed of entering playmode (and writing your scripts in a way that works with skipping domain reload) and improving compilation speed to the level it works for you (I am already using asmdefs but even in a project with only a single script it is not as fast as yours). Thanks a bunch for the good content :).
While watching this video I thought to myself: "This is neat! I should really subscribe to this guy!" But apparently I was already subscribed because of that amazing DOTWEEN video. Big thanks for spreading your knowledge and keep up the great content!
Great video! To the point and a clear bunch of examples. Thanks for adding something new to my toolbox. Subbed and looking forward to checking out your other vids.
Extension Methods are just syntactic sugar for grouping util functions to their according classes. Which is stupidly useful. Kotlin does it the exactly the same way, JavaScript and TypeScript has it too, just works a little different. I'd usually create separate classes for the extension methods named according to the class which I extend on. Like the List extensions go into ListExtensions and the Hero extensions in HeroExtensions and have them all in a name space for alle extension methods.
I'm glad you don't throw every single method in a monolithic class! I was having a convo recently about where people store enums. Some people would chuck all enums in 1 "enums" file. I personally put them below their main class declaration. enum HeroType will be below the ScriptableHero declaration for example.
Awesome video as always! Just a small thing at min 6:50 you said that you are mutating a string, but that's false, you are returning a new string and printing it, the "hero" string remains the same . ("String objects are immutable: they cannot be changed after they have been created. All of the String methods and C# operators that appear to modify a string actually return the results in a new string object")
I talk about string immutability in my previous video. I more meant to the context of the caller, we are 'mutating' the string. Not from a programmatic standpoint but a functional standpoint. It's good you mentioned it anyway as others may have the wrong idea 💡
I'd love to see a video about custom attributes. Commands from Quantum Console are good example [Command] public void Teleport(Vector3 pos) This would automatically grab name of method and register this as command with Vector3 argument.
Hey thank you for your great videos. I would like to suggest a video about using events in unity, how to set them up and subscribe to them in another script. Best regards
Back again after an excursion through your channel. Awesome stuff, you're a great teacher! I hope you keep on going with more intermediate & advanced topics for us peeps who are beyond the basics. One thing I notice you do is use var instead of specifying the type when defining references, is that just a personal taste thing?
Personal taste, but efficiency comes into it. I can tell the type by the declaration and if I can't I'd prefer to hover to see than have every type on display. Sometimes you don't know the type right away, so I'd prefer to just start coding than sit there thinking about it. Curious why you prefer specifically typed?
@@Tarodev thanks for your insight. I wouldn't say I prefer specifically typed, I just learned it that way. Its always seemed unnecessary to me to write the Type twice though, so the var approach is quite appealing.
Tarodev You are such a master!! ..What books you read? recommend to us beginners and intermediates ? Which online resource can teach us all this C# stuff like you do ? Can you recommend somethings / many things additional who really want to get good at this C# programming art. Some day please take time and make a video on this "Recommeded learning resources as per Tarodev". Thanks.
I didn't read any books. I learned by jumping in to make things and just looking stuff up as I got stuck. I would suggest not learning purely via unity tutorials, but focus more on pure c# content. Everybody learns differently, I always found hands on the best for me, but books may be best for you 😊 as long as you find the method you choose to be fun and not boring I'd say you're doing it right.
Hey Tarodev! Love the channel, thanks for all of the useful info. At the moment I'm learning c# and am just now getting into (maybe) intermediate topics (inheritance, polymorphism, structs and interfaces). At what point am I going to know enough to be effective in unity? I'm worried ill jump in too early, brute force stuff and learn the wrong habits. Is there like a minimum level of competency or something? I mostly understand your videos and if nothing else they give me new terms and concepts to research when I'm in over my head.
Interesting question. I would say learn some basic design patterns like the enum-state manager in my GameManager video and then also a normal state manager (infallible code has a good one). If you're making a smallish game, stick with the enum game manager in my opinion. With that knowledge I think you're good to just jump in. Making mistakes is learning. You can always join my discord to ask me/community questions if you're unsure about something
Something could be good is a video about namespaces. I take some 3rd parties scripts and almost no one uses. So, how to use and about how struct them in directories could be a good video =) (Sorry about my english)
I have a question .. sometimes when I work with static classes in some mobile devices they doesn't work for some reason .. some said they get garbage collected , is there a way to protect a class from getting garbage collected or is there something I don't know about ?
Old video, but why do you have a flat extension method? Vector3.ProjectOnPlane() already does exactly what that does if you use Vector3.up as the second argument. To be fair, I do wish project on plane were an extension method by default.
I Made tihs one => public static T GetRandom(this List ts, int initialInclusive = 0, int finalExclusive = 0) { if (finalExclusive == 0) { finalExclusive = ts.Count; } return ts[UnityEngine.Random.Range(initialInclusive, finalExclusive)]; }
✔ Very very cool
✔ Very easy
✔ Very neat
Every single interesting thing that I have heard about recently you make a video on like a week later. You are literally predicting what I want to learn next. Legend!
I'm just outside your window
@@Tarodev There actually was a person outside my window a few hours before I wrote that. And it wasn't my neighbors cause they are always loud and talking when they go by. Creepy bro! lol
@@SpicyMelonYT Ah no worries, it's normal too see programmers foraging outside in ya garden around this time of year, just give him a cuppa of joe and he will bugger of on his own. else, sprinkle your garden with invitations to sprint meetings and mails from projectmanagers / IdeaGuys with "the next big thing" to keep your garden guaranteed programmer free
@@DmpDk LMAO will do mate!
you are slowly becoming my favorite game dev tutorial channel. keep up the useful content!
hes been mine since the video about generics
I appreciate it :) Hopefully I can climb to #1 of your list... It is now my mission!
Thanks a bunch man :) Glad I can deliver enjoyable content for you
One thing I'd add is that you can use the 'ref' keyword on the extended argument. Can be useful for, for example, mutating a collection in place
We need kind of tutorial of ref I think.
This was a rollercoaster of me shaking my head and nodding.
Makes a static class called extensions, adds a method to it and calls if from the class. *face palm*
Immediately turns the method into a proper extension method. Redeemed.
Makes an extension method to return a random from a list of strings. *face palm*
Immediately makes the method generic. Redeemed.
You're a true legend.
Gotta keep you guessing my man
I'm amazed by the simplicity to usefulness ratio!
your channel is a goldmine for game programmers!
Absolute favorite channel for intermediate level programming!
ty for putting those screenshots of extension methods at the end, really neat !
I just found out your channel... All I have to say: This is a goldmine!
Love your little check list ♥
you are my fav game dev channel plz keep making vids like this
After 4 years of using C# I learn something useful in each video. Thanks
Time to rewrite all my code again !! That generics thing was really interesting, I need to look into that some more.
Man, I love this channel. You are creating content right in my level of skill. I can follow everything easily, but you keep on showing me things that are new/useful. Thanks for the vid!
bro this is INSANE !!!!!!!!!!!!!!!!!!!!!!!!!!!!
I would love to see you as the game dev RUclips channel 💜 you are just awesome 🤪
I am still pretty new to game development (I've been doing it for about 9 months now). This channel is absolute gold. I can't tell you how many times I have thought to myself "I wish this was a method I can call". For me, the hardest part is keeping things nice and tidy (I tend to make waaay to many scripts and I start getting lost in them). This is definitely a neat trick and I will 100% use it in the future. Thank you!
You are actually someone who knows what he is talking about!
Thanks!
Was about to skip this since I thought I already knew what extension methods were. Turns out I did not. It's absurd how much a ten minute video can help you in your career. Thanks a bunch!
I had no idea about this, it'll be very usefull
I always learn an entirely new thing about C# in this channel
Really cool indeed ! I code in C# for 3 years now and did not know about this
Programming is such a vast topic with so many concepts. You'll always discover new goodies 😊
i have notifications on for this channel but still no notification, i only look at it when it comes in my recommendation
A few people have said this 😢
I noticed it in this video and a bunch of other video of you as well. Your Unity compiles and enters playmode ridiculously fast. For playmode enter I know you can disable scene and domain reload but I have run into problems with that once before. I would love a video on how to improve the speed of entering playmode (and writing your scripts in a way that works with skipping domain reload) and improving compilation speed to the level it works for you (I am already using asmdefs but even in a project with only a single script it is not as fast as yours). Thanks a bunch for the good content :).
This would be a few things:
1. This is a fresh project, so not many scripts
2. I edit a bit of the load out so you don't have to wait for it ;)
@@Tarodev hehehe well okay that obviously works too :D
@@fleity the hollywood style of development :D
@@Tarodev big brain 🧠
That's so perfect for tutorial, thanks
My new favorite channel
Wow I'm going to use this more!
Love your videos, thanks for sharing!
Very clear.
While watching this video I thought to myself: "This is neat! I should really subscribe to this guy!"
But apparently I was already subscribed because of that amazing DOTWEEN video.
Big thanks for spreading your knowledge and keep up the great content!
*this* is incredible. Time to rewrite my helper class
Thank you!
Of course Tarodev is inside heroes list
Yeah boi 😉
interesting hero gradation :D so humble that Tarodev
Very nice! I hope to build my toolbox of useful extension methods. Thanks for the video! Gave it a big like.
great guide, thanks
As always, good stuff!
Nice, simple and easy.
Thank you for this.
Thank you very much, your tutors are wonderful
Very very cool
Very Easy
Very Neat!
Haha love it
Awesome stuff, Taro. I laughed so hard during the checklist of coolness and neatness, well done! :D
I particularly also liked how you dove into multiple practical demos of the concept!
You should create a library with your extension methods!
I've seen a few repos around with a bunch, but yeah you're right there certainly a need for an easy to install package.
Wow, this is great
Super cool! Thanks man
Wonderful tutorial, had no idea this existed and now I may never stop using that hahaha
+1 sub
Amazing tutorial as usual but can you zoom a bit when using rider so mobile users can see easier thank you ❤️
Ah dude in editing I remembered I didn't zoom in and felt bad. I tried to add zoom on every code segment but it looked horrible. Sorry bud >
Great video! To the point and a clear bunch of examples. Thanks for adding something new to my toolbox. Subbed and looking forward to checking out your other vids.
Great Tutorial as always!
✅ Very Very Cool
✅ Very Easy
✅ Very Neat
this.
this is excellent
And so are you, my dude
Thanks a lot for the video. Extension methods indeed seem Very very cool, very easy and very neat
I’ve always wanted to know how to make those, great tutorial thank you
This is a very old (I mean ancient) OOP trick but thanks for sharing. 😇
Super cool 😎
Hercules, Thanos, Tarodev
I can see it now...
public static override ThanosSnap() => DoNothing();
Tarodev saves the world \o/
The power of a programmer
Another great video :) still waiting patiently for the knitting one
Can you handle my knitting? Not so sure
Only if you can knit my handle
Thanks!!!
Extension Methods are just syntactic sugar for grouping util functions to their according classes. Which is stupidly useful. Kotlin does it the exactly the same way, JavaScript and TypeScript has it too, just works a little different.
I'd usually create separate classes for the extension methods named according to the class which I extend on. Like the List extensions go into ListExtensions and the Hero extensions in HeroExtensions and have them all in a name space for alle extension methods.
I'm glad you don't throw every single method in a monolithic class!
I was having a convo recently about where people store enums. Some people would chuck all enums in 1 "enums" file. I personally put them below their main class declaration.
enum HeroType
will be below the ScriptableHero declaration for example.
Good job
NICE
Awesome video as always! Just a small thing at min 6:50 you said that you are mutating a string, but that's false, you are returning a new string and printing it, the "hero" string remains the same . ("String objects are immutable: they cannot be changed after they have been created. All of the String methods and C# operators that appear to modify a string actually return the results in a new string object")
I talk about string immutability in my previous video. I more meant to the context of the caller, we are 'mutating' the string. Not from a programmatic standpoint but a functional standpoint.
It's good you mentioned it anyway as others may have the wrong idea 💡
实在是太有用了!我怎么没有更早认识你呢!
This is so incredibly useful.
Nice
I'd love to see a video about custom attributes. Commands from Quantum Console are good example
[Command]
public void Teleport(Vector3 pos)
This would automatically grab name of method and register this as command with Vector3 argument.
Didn't know Quantum Console existed until just now, pretty nice!
I would be really glad a tutorial on "ref" "out" keywords
Hey thank you for your great videos.
I would like to suggest a video about using events in unity, how to set them up and subscribe to them in another script.
Best regards
Back again after an excursion through your channel. Awesome stuff, you're a great teacher! I hope you keep on going with more intermediate & advanced topics for us peeps who are beyond the basics. One thing I notice you do is use var instead of specifying the type when defining references, is that just a personal taste thing?
Personal taste, but efficiency comes into it. I can tell the type by the declaration and if I can't I'd prefer to hover to see than have every type on display.
Sometimes you don't know the type right away, so I'd prefer to just start coding than sit there thinking about it. Curious why you prefer specifically typed?
@@Tarodev thanks for your insight. I wouldn't say I prefer specifically typed, I just learned it that way. Its always seemed unnecessary to me to write the Type twice though, so the var approach is quite appealing.
@@jsn4591 it's the time to change! Start doing it and you will kick yourself for not doing it sooner.
Tarodev You are such a master!! ..What books you read? recommend to us beginners and intermediates ? Which online resource can teach us all this C# stuff like you do ? Can you recommend somethings / many things additional who really want to get good at this C# programming art. Some day please take time and make a video on this "Recommeded learning resources as per Tarodev". Thanks.
I didn't read any books. I learned by jumping in to make things and just looking stuff up as I got stuck. I would suggest not learning purely via unity tutorials, but focus more on pure c# content.
Everybody learns differently, I always found hands on the best for me, but books may be best for you 😊 as long as you find the method you choose to be fun and not boring I'd say you're doing it right.
@@Tarodev Yes Agreed Boss. Everyone's in that sense. Thanks a lot for your kind reply.
Great explanation! Could you please make the font a little bigger in the editor next time recording? It's a little hard to see watching this on phone
Yeah sorry about that. I realize I didn't zoom when I started editing. I tried zooming the video but it looked bad 😢
I did the random one before, but used IEnumerator instead of IList to make it available for other data types as well
A bit more difficult with IEnumerable as it doesn't offer count. But still doable
Спасибо за годный контент
You're welcome :)
Hey Tarodev! Love the channel, thanks for all of the useful info.
At the moment I'm learning c# and am just now getting into (maybe) intermediate topics (inheritance, polymorphism, structs and interfaces).
At what point am I going to know enough to be effective in unity? I'm worried ill jump in too early, brute force stuff and learn the wrong habits. Is there like a minimum level of competency or something? I mostly understand your videos and if nothing else they give me new terms and concepts to research when I'm in over my head.
Interesting question. I would say learn some basic design patterns like the enum-state manager in my GameManager video and then also a normal state manager (infallible code has a good one). If you're making a smallish game, stick with the enum game manager in my opinion.
With that knowledge I think you're good to just jump in. Making mistakes is learning. You can always join my discord to ask me/community questions if you're unsure about something
@@Tarodev thanks, man! I appreciate you taking the time.
Gold
Great video.
A little concerned about what's considered a hero though.
*stares at Thanos' name
Unity knows that Thanos isn't a hero
It seemed that way... We know he is though
Something could be good is a video about namespaces. I take some 3rd parties scripts and almost no one uses. So, how to use and about how struct them in directories could be a good video =) (Sorry about my english)
I am a C# dev but I clicked purely because of the Clash of Clans font so take that for what you will
I love it 😅
it's 420 O' Clock in classroom 69 kids!
420 69 lol
This legend sneaked in these holy numbers in a programming tutorial. Niceee XD
Excuse me they were entirely random
I have a question .. sometimes when I work with static classes in some mobile devices they doesn't work for some reason .. some said they get garbage collected , is there a way to protect a class from getting garbage collected or is there something I don't know about ?
How come you enter Play Mode so fast?
He has a tutorial on that
Here it is: ruclips.net/video/P7cYVg5fAvY/видео.html
Also, ctrl + p is the hotkey to enter
ENGAGING
ENGAGING CONTENT?
@@Tarodev ENGAGEEEEDD
@@youcancallmedoggie you did well
Why his Unity loading so fast i cant understand bruh
my takes like 20 seconds to load stuff and then run game
Check out this tutorial my guy ruclips.net/video/P7cYVg5fAvY/видео.html
What code editor are you using VS Code?
5:38 lmao
whats with the rider licences?
Random int 420 😂 Ok, like ✊
Hello
Oh, hi
how does your project start so fast lol
Go to my channel and look for 'enter play mode faster'
@@Tarodev I had a feeling you had one video about that, thanks :)
Good video, really helpful. But unfortunately have to dislike and report because typing braces in the same line is war crime.
Haha getouttahereeeeee
666th like
🤘
public static void DestroyChildrenRecursive(this Transform transform)
{
foreach (Transform t in transform)
{
t.DestroyChildrenRecursive();
}
Object.Destroy(transform.gameObject);
}
Old video, but why do you have a flat extension method? Vector3.ProjectOnPlane() already does exactly what that does if you use Vector3.up as the second argument. To be fair, I do wish project on plane were an extension method by default.
I Made tihs one =>
public static T GetRandom(this List ts, int initialInclusive = 0, int finalExclusive = 0)
{
if (finalExclusive == 0) { finalExclusive = ts.Count; }
return ts[UnityEngine.Random.Range(initialInclusive, finalExclusive)];
}