New C# Features in Unity

Sign up for the Level 2 Game Dev Newsletter: eepurl.com/gGb8eP
As of Unity 2021.2, you now have access to some new C# features in Unity. This is thanks to improved support for .NET Standard 2.1 which has given us Unity developers the ability to use all of the features available in C# 8.0. In this video I'll cover a handful of programming features that I think are the most interesting.
Learn more about C# 8 here: docs.microsoft.com/en-us/dotn...
00:00 Introduction
01:18 Sign up for the Level_2 Game Dev Newsletter
02:10 Readonly Members
06:00 Default Interface Methods
08:42 Indices and Ranges
11:12 Conclusion
💬 Join Our Community
Discord: / discord
Patreon: / infalliblecode
Newsletter: eepurl.com/gGb8eP
❤️ My Favorite Unity Assets *
Odin Inspector and Serializer: assetstore.unity.com/packages...
Editor Console Pro: assetstore.unity.com/packages...
Rainbow Folders 2: assetstore.unity.com/packages...
Peek: assetstore.unity.com/packages...
Project Search & Replace: assetstore.unity.com/packages...
⚡ Unity 3D Plus: prf.hn/click/camref:1100l3e8M/...
⚡ Unity 3D Pro: prf.hn/click/camref:1100l3e8M/...
👋 Contact me directly at charles@infalliblecode.com
* Disclosure: These are affiliate links, which means I'll receive a commission if you use them to make a purchase.
👋 Contact me directly at charles@infalliblecode.com
* Disclosure: These are affiliate links, which means I'll receive a commission if you use them to make a purchase.

Пікірлер: 126

  • @InfallibleCode
    @InfallibleCode2 жыл бұрын

    Sign up for the Level 2 Game Dev Newsletter: eepurl.com/gGb8eP

  • @Unity3dCollege
    @Unity3dCollege2 жыл бұрын

    Made it into the friends list! :) Great video btw!

  • @InfallibleCode

    @InfallibleCode

    2 жыл бұрын

    Hah! Darn right you made the list, Jason! Sorry I've been MIA, it's been a crazy year >

  • @ShatabdaRoy115

    @ShatabdaRoy115

    2 жыл бұрын

    Lol

  • @iHeartGameDev
    @iHeartGameDev2 жыл бұрын

    That sweet sweet syntactic sugar! Thanks for another awesome video, Charles! Your videos are one of the few I make sure to watch from start to finish because literally everything you explain has value.

  • @InfallibleCode

    @InfallibleCode

    2 жыл бұрын

    Thank you, Nicky! That means a lot coming from you 🙏

  • @happypixls
    @happypixls2 жыл бұрын

    My issue with default interface method is that it starts to blur the line between abstract classes and the classical definition of an interface (i.e. interface is a contract). I've honestly ran into interesting design pattern problems where I really wanted to have a default interface method, but then I thought it was a bad design from my part that trapped me in that corner. Even though I know that this is more of C# discussion rather than Unity discussion, but I'm curious to hear/read your opinion about it :)

  • @videoaulasmayleone

    @videoaulasmayleone

    2 жыл бұрын

    I think the same. Through this new feature, I'm not be able to see the main difference between Abstract Classes and Interfaces anymore.

  • @cyborcgames

    @cyborcgames

    2 жыл бұрын

    I imagine that the only difference now is that there is no multiple inheritance in C# so you can only inherit 1 abstract class. But your class can have more than one interface implementations.

  • @LeMustache

    @LeMustache

    2 жыл бұрын

    The change has been put in place mainly in order to provide a gateway for library developers to allow updating interfaces without introducing breaking changes. Not as an every day feature for app developers.

  • @happypixls

    @happypixls

    2 жыл бұрын

    @LeMustache, I already see what you are saying, but what about the possibility of diamond shaped interface implementation in this case (is that even possible now?) I didn't try it yet to see how the compiler handles it. And interfaces are no longer "contracts" unless you inforce it when you are developing with a team. So yeah, very interesting language design decision. Probably not introducing that feature and tell developers to write extension methods is a better idea? I don't know what would be the right answer in this case tbh.

  • @dealloc

    @dealloc

    2 жыл бұрын

    When interfaces tries to become protocols but really aren't.

  • @ThousandAnt
    @ThousandAnt2 жыл бұрын

    Great video Charles! Definitely looking forward to trying out some of those new array tricks :)

  • @jean-michel.houbre
    @jean-michel.houbre2 жыл бұрын

    Very clear. An additional part would be welcome, your introduction is perfect for tackling the documentation effectively. Thank you.

  • @InfallibleCode

    @InfallibleCode

    2 жыл бұрын

    Noted!

  • @BorisNovikov1989
    @BorisNovikov19892 жыл бұрын

    10:41 the line 15 seems to be a little wrong. It would print first four elements, not five as the end index is exclusive.

  • @LorenzoValente
    @LorenzoValente2 жыл бұрын

    Waiting for part 2! Your content is 🔥

  • @InfallibleCode

    @InfallibleCode

    2 жыл бұрын

    Appreciate it!!

  • @mosth8ed
    @mosth8ed2 жыл бұрын

    Definitely a part two, please.

  • @wendten2
    @wendten22 жыл бұрын

    I'm so glad you mentioned the Jasons, I had a fear you were no longer on good terms. I really miss your chats with Storey, as you two had so informative correspondence with each other.

  • @InfallibleCode

    @InfallibleCode

    2 жыл бұрын

    Hah, glad to clear that up! We are all still very much on good terms. I've just been super busy so I put the livestreams on the back burner for a while.

  • @DevDunkStudio
    @DevDunkStudio2 жыл бұрын

    Thanks for this! Really helpful

  • @INeatFreak
    @INeatFreak2 жыл бұрын

    I think using minus ( example: "carrots[-5]" ) rather than ^ would be a lot easier to reason about. But still a cool feature :)

  • @libberator5891

    @libberator5891

    2 жыл бұрын

    I agree with this. Cause I probably can't do: int i = ^1; and increment that to cycle backwards. Right? (I haven't tested it; just assuming)

  • @InfallibleCode

    @InfallibleCode

    2 жыл бұрын

    That actually _would_ make a lot of sense

  • @harshmudhar96

    @harshmudhar96

    2 жыл бұрын

    It actually doesn't make sense.

  • @harshmudhar96

    @harshmudhar96

    2 жыл бұрын

    If you do "-1" you're still passing an integer to the indexer, which is handled by implementing something like public T this[int index] We could always do this. Meanwhile, ^1 is special syntax for "new Index(value: 1, fromEnd: true)" and would be handled by implementing an indexer like public T this[Index index] Also, protip, use Index.End or Index.First instead of ^1

  • @libberator5891

    @libberator5891

    2 жыл бұрын

    Good point. And refactoring how arrays and indexing works to include out of range indices could not only break things (and not be backwards compatible), but may also slow down arrays a little bit as they'd have to do an extra step to parse the index. Guess they've thought of this 😅

  • @nielsvdmarel
    @nielsvdmarel2 жыл бұрын

    great video! part 2 would be nice!

  • @AlanZucconi
    @AlanZucconi2 жыл бұрын

    This is the content I'm here for. ✨

  • @InfallibleCode

    @InfallibleCode

    2 жыл бұрын

    Heck yeah! Appreciate it, Alan :D

  • @christophermonteferrante5724
    @christophermonteferrante57242 жыл бұрын

    Part 2 please! You're the man.

  • @InfallibleCode

    @InfallibleCode

    2 жыл бұрын

    Thank you, Christopher!

  • @soverain
    @soverain2 жыл бұрын

    Finally! On the road to C# 10 🚀

  • @LipeSK20
    @LipeSK202 жыл бұрын

    Default Interface Methods is definitely my new favorite feature.

  • @nareshbisht7620
    @nareshbisht7620 Жыл бұрын

    Indices and Range feature is awesome

  • @badverb9267
    @badverb92672 жыл бұрын

    Excellent content. :)

  • @rafa_guitar
    @rafa_guitar2 жыл бұрын

    Thanks for sharing! Deafult Interface methods call my curiosity ;-)

  • @InfallibleCode

    @InfallibleCode

    2 жыл бұрын

    You should definitely read up and play around with them. They're a great tool to have in your developer toolbelt :D

  • @VEOdev
    @VEOdev2 жыл бұрын

    That array thing ^ .. will be helpfull

  • @chaoscifer
    @chaoscifer2 жыл бұрын

    Most photogenic youtuber ever

  • @InfallibleCode

    @InfallibleCode

    2 жыл бұрын

    Thank you! 💁

  • @Draekdude
    @Draekdude2 жыл бұрын

    Keep up the great videos!

  • @lifeisgameplayit
    @lifeisgameplayit2 жыл бұрын

    Thanks !

  • @ElboxD
    @ElboxD2 жыл бұрын

    When this video was posted, I didn't understand a single thing of it. 3 months later, after studying like hell, I still don't get it... lol, jk. It's so cool to be able to understand every single bit of the video. I feel proud of what've accomplished in these 2 months, helps to fight the depression and impostor syndrome. It means a lot to me. It wouldn't have been possible without awesome people like: Charles, SamYam, and all other other amazing youtubers out there. Thanks!

  • @filipathtc
    @filipathtc2 жыл бұрын

    You look really good Charles!

  • @dragonlance1121
    @dragonlance11212 жыл бұрын

    @10:45 If what he is saying here is correct, wouldn't that line be incorrect? Shouldn't it be "First Four:" if the end range number is exclusive?

  • @OdysseyHome-Gaming
    @OdysseyHome-Gaming2 жыл бұрын

    Peppered throughout? You mean sprinkled throughout. 😋

  • @rickyfreddy6963
    @rickyfreddy69632 жыл бұрын

    Did you reupload this video? I saw it once before and I don't think it was uploaded that recently then. If so, is this a setup for a part 2? 😁

  • @Gbtx6
    @Gbtx62 жыл бұрын

    it sucks that we don't access to c#10or at least 09.There's just so much more added in both versions but at least we're Unity is moving forward with the changes. I just recently starting using Unity, and it's been a nice experience, but Im biased given that I already know 2 other engines, Godot and gamemaker studio 2. It feels great to use my beloved C# in an engine like Unity. Thanks a lot for the video!

  • @Clawthorne

    @Clawthorne

    2 жыл бұрын

    As someone who explored the current game engine market and their C# support... this is pretty much the best you're gonna get right now sadly. All the other engines are either stuck on really old versions of Mono, or they have poor crossplatform support, or they have kind of terrible licenses, or they simply don't care that much about C#.

  • @Gbtx6

    @Gbtx6

    2 жыл бұрын

    @@Clawthorne damn, that's pretty sad to hear. I'll enjoy every bit of it while I can. Thanks for the heads up and great content brother!

  • @Korn1holio

    @Korn1holio

    Жыл бұрын

    Would you recommend Godot over Unity? After a year with Unity I'm finding Unity terrible and bloated with features, half of which doesn't work as they should... I spend more time struggling with Unity's features that don't work as they should, than doing actual coding, but maybe it's just me.

  • @Gbtx6

    @Gbtx6

    Жыл бұрын

    @@Korn1holio i got busy working on other things and stopped using unity. I plan on using it again soon. If you wanna make some money, in terms of job availability, go with unity and develop your own tools. You can also use c# with Godot, but setting up takes a bit of getting used to, so you can use gdscript of that doesn't suit you well. If you just wanna make 2d games, go with Godot or gamemaker. I'd still say look for good tutorials regarding unity, but most importantly, develop the tools you might need to make your life easier with Unity. It'll take some time, but it'll be worth it. Now i need to ask, what's the reason you're picking up Unity?

  • @raianmr2843

    @raianmr2843

    Жыл бұрын

    not 9, you mean 9 - -. Record types and init still don't work. Arguably two most important C#9 features for writing safer code. Clean architecture is also a pain in Unity if you're still in monobehavior-land.

  • @pliniomourao
    @pliniomourao2 жыл бұрын

    Part 2 please

  • @Tarodev
    @Tarodev2 жыл бұрын

    Default interface methods, how fantastic. Probably making it harder for new devs to decide between interface and abstract now they're even closer together 😜 Thanks for the video Charles!

  • @manzell
    @manzell2 жыл бұрын

    Is there a reason they used a carat for the index-from-end rather than a - negative sign?

  • @christopher6886
    @christopher68862 жыл бұрын

    Nice video, thanks for the info. FWIW, melee is not pronounced "me-lee", it is a French word and pronounce "meh-LAY".

  • @InfallibleCode

    @InfallibleCode

    2 жыл бұрын

    Thanks for the info! I've been pronouncing it "me-lee" for as long as I can remember but I _have_ heard it pronounced "meh-LAY". It just doesn't come out of me that way naturally xD

  • @GiraPrimal

    @GiraPrimal

    2 жыл бұрын

    @@InfallibleCode There's an easy solution for that: think how the announcer shouts "Super Smash Bros. Melee" in that game.

  • @ludologian
    @ludologian2 жыл бұрын

    Could you do introduction into functional paradigm in c# ( for mvu design pattern) mvvm. mvu and if could be used together?( I've heard it has some similarity of game engine loop) I know it ment for app development data -code separation if this could be used in unity I would like to see an example and use cases also the new declarative ui systems. while I understand it's better option , I don't know if they could build it upon some maui implementations? . should I learn that too ? or because it missing some new c# futures? It's kinda weird why wouldn't they utilize unity tiny project to build something like Open fuse ( app development framework uses opengl) I believe unity could cut down app size , using .net core runtime or by new platform with burst compiler just like open fuse but with c# and all the tools we like in Unity editor.

  • @Luturol
    @Luturol2 жыл бұрын

    When should I use default interface methods instead of using an abstract class?

  • @ShatabdaRoy115
    @ShatabdaRoy1152 жыл бұрын

    If you can compare the older and newer functions, it would help young devs like me. NEED PART 2 PLSSSSS

  • @epiphanyatnight8732
    @epiphanyatnight87322 жыл бұрын

    Off topic question: What theme are you using in Rider, Charles? It looks quite soothing and not boring. :)

  • @Joso997
    @Joso9972 жыл бұрын

    Don't default interface methods kind of break Abstract classes?

  • @sqw33k
    @sqw33k2 жыл бұрын

    10:10 Wouldn't that be the fourth from the end? "Brackeys"

  • @zeeshansattar4531
    @zeeshansattar45312 жыл бұрын

    I've subscribed to "Level 2 Game Dev Newsletter" since you announced it and I have not received any newsletter yet?

  • @ThousandAnt

    @ThousandAnt

    2 жыл бұрын

    Check your spam filters because we have sent a few out. Feel free to sign up again as well

  • @zeeshansattar4531

    @zeeshansattar4531

    2 жыл бұрын

    @@ThousandAnt didn't find there as well. And I tried to sign up again but failed got error. Ops I missed few newsletters despite being from one of earliest subscriber to this newsletter:(

  • @saeedbarari2207
    @saeedbarari22072 жыл бұрын

    Whoa. Now how long till 2021 comes LTS ?

  • @CyberAngel67
    @CyberAngel672 жыл бұрын

    Correct me if I am wrong, because it appears you have lost the plot. Unity introduce C#8 into Unity 2020.2, or at least the vast majority of that support. And as of Unity 2021.2, they introduce a small subset of C# 9.0, so I am confused how they then snuck this up to C#10 when not even all of C#9 is supported as yet? And C#11 is not even finalised and no work has even begun on that as yet. Did you have too much to drink New Years Eve? And 2 of the 3 things you mentioned I have specifically been using since Unity 2020.2, the other I am not 100% certain it was in that version of Unity.

  • @meowsqueak
    @meowsqueak2 жыл бұрын

    readonly on a property or method looks a lot like class member function “const” in C++, but there a “mutable” keyword on a data member is needed in order to implement optimisations like memoisation and logging. In this video, to be analogous, the LastDistanceUpdated time stamp should somehow be allowed to be modified even though Distance is readonly - does C# 8 provide for this?

  • @MidnightSt

    @MidnightSt

    2 жыл бұрын

    readonly on a (public) property means it's read-only *from the outside*. it's a shortcut for Property { public get; private set; } You can still change its value from the inside of the class that owns the property.

  • @meowsqueak

    @meowsqueak

    2 жыл бұрын

    @@MidnightSt in the video the readonly keyword is applied to a method / member function, and the “fix” shown to get it compile is to remove a change to a non-readonly property. What I’m asking is how to mark that property as mutable so that a readonly method can modify it internally. Edit: I suspect what I’m asking isn’t possible due to the way C# handles value types - a mutable internal field of a struct modified by a “readonly” method would break the compiler’s ability to avoid a copy, so probably doesn’t make sense like it does in C++.

  • @maximilianherz
    @maximilianherz2 жыл бұрын

    Nice Video, Thank you! Can anyone tell me why C# allows Methods in Structs? I learned that structs are only for data. I dont even think other languages allow this.

  • @GiraPrimal

    @GiraPrimal

    2 жыл бұрын

    That "only struct for data" convention kinda makes sense in languages like C++ where there’s almost no difference between classes and structures. In C++, only the default member accessor changes. Things work a bit differently in C#. Structs are value types, meaning they are copied when passed to a function or to a variable, and instantly destroyed when you no longer need them. They do not support inheritance, but they do support interface implementation. Classes are reference types, which means you’re only passing a reference to the same instance of a class when calling a function or changing a variable. The instance is only destroyed later by the garbage collector when all references to it are lost. They support class inheritance and interface implementation. There are other subtle differences, but that’s the basics. In C#, it’s good practice to use structs only to hold small amounts of data, or in some cases when you want to keep full control of memory usage. With both types, it’s a good idea to define methods to manipulate them easily.

  • @maximilianherz

    @maximilianherz

    2 жыл бұрын

    @@GiraPrimal Thanks for the answer! :)

  • @libberator5891
    @libberator58912 жыл бұрын

    I've signed up for the newsletter, but has any been sent out yet? I haven't seen any

  • @InfallibleCode

    @InfallibleCode

    2 жыл бұрын

    We're running a little behind on last month's issue due to the holidays. Our next newsletter should go out by the end of this month :D

  • @libberator5891

    @libberator5891

    2 жыл бұрын

    @@InfallibleCode ok so you *have* sent some out. I signed up right at the start, so maybe my email got lost. Guess I'll sign up again. Thx for the great content Charles!

  • @CommsDanielHession
    @CommsDanielHession2 жыл бұрын

    i ididn't know VB was so popular.

  • @modernkennnern
    @modernkennnern2 жыл бұрын

    If it uses .Net Standard 2.1, can you not then use C#10 features? Even .Net Standard 2.0 supports (most of) C#10 features

  • @WarlordMSM
    @WarlordMSM Жыл бұрын

    should not fifth element form the end be ^5?

  • @soper51so66
    @soper51so662 жыл бұрын

    I need your advice guys for someone like me who focus on 3D design and animation Which is better to choose UE4 Blueprint or Unity C# ?

  • @styliann

    @styliann

    2 жыл бұрын

    In Unity you have Visual Scripting which is quite user-friendly. I would just take a look at both and see what works for you. If at some point you’d like to add some pieces of manually written code C#/Unity is significantly easier though.

  • @TheAgavi

    @TheAgavi

    2 жыл бұрын

    @@styliann Not to muddy the water again but UE4 also has visual scripting. Unity does use C# which I hear is easier to learn than C++ in UE4

  • @Clawthorne

    @Clawthorne

    2 жыл бұрын

    For design and animation I'd say UE5, simply because of the new light and rendering engine. You'll be able to make some spectacular looking things. Blueprints are more than enough to do simple things like choreographing animations and triggering events in scenes.

  • @K3rhos

    @K3rhos

    9 ай бұрын

    I worked with C++ for years, and recently moved to C#, honestly this is night & day, it's a lot of time saving, C# is way easier and more modern to program with, the only issues is on the security aspect, it's way easier to obfuscate and protect your code from piracy/reverse engineering when working with C++, because it's a closer language to assembly. C# on the contrary it's really easy to decompile and stole your code. EDIT: Forget about visual scripting, you will never become a real dev if you do visual scripting, maybe it's worth as a begineer to start with, but as soon as you're familliar with some programming concepts move to real programming, it's way better and possibilities are endless !

  • @misterstudentloan2615
    @misterstudentloan26152 жыл бұрын

    Can make a part 2?

  • @meowsqueak
    @meowsqueak2 жыл бұрын

    Gosh, two different syntaxes for ranges and indexes from the end of a sequence - could have just used slice notation from Python and got both with one nice syntax…

  • @makoto-samaru8004
    @makoto-samaru80042 жыл бұрын

    So that's why my unity editor crashes every time i try to put a script component in my gameobjects.

  • @RedLionYTB
    @RedLionYTB2 жыл бұрын

    Will there still be code review lives?

  • @InfallibleCode

    @InfallibleCode

    2 жыл бұрын

    I don't think there will be for a couple of months. But we may pick them back up in the Summer. And if not live reviews, we may pre-record them.

  • @RedLionYTB

    @RedLionYTB

    2 жыл бұрын

    @@InfallibleCode Great! Lookin forward for the code reviews, also really nice video :D

  • @siarheipilat8152
    @siarheipilat81522 жыл бұрын

    Wait so i don't get it. Is Range supported now or what? Or is it only for 2021?

  • @InfallibleCode

    @InfallibleCode

    2 жыл бұрын

    It's supported from 2021.2 and onwards. You have to select Net Standard 2.1 in your project's settings to gain access to it and all of the other C# 8 features.

  • @crossslive760

    @crossslive760

    2 жыл бұрын

    @@InfallibleCode Hi thx for the video but i cant use Range in my template urp project. Net Standard 2.1 already selected by default urp template project btw.

  • @psychologiagaming502
    @psychologiagaming5022 жыл бұрын

    omg, this is why they recommend visual studio 2019 rather than 2022???

  • @hamsterhaunter5718
    @hamsterhaunter57182 жыл бұрын

    Can we talk on patreon? It's important

  • @InfallibleCode

    @InfallibleCode

    2 жыл бұрын

    Just replied to your message on Patreon and took care of what you asked about 👍

  • @ashereinhorn
    @ashereinhorn2 жыл бұрын

    🐱

  • @dasten123
    @dasten1232 жыл бұрын

    lol what kind of statistic is listing freaking visual basic before javascript in terms of popularity??

  • @felipepeixoto8782
    @felipepeixoto87822 жыл бұрын

    i want my "___ is not null" conditional instead of "!( ___ is null)"

  • @libberator5891

    @libberator5891

    2 жыл бұрын

    if(__ != null) or just... if(__) You must be coming from python 😉

  • @Serotonindude

    @Serotonindude

    2 жыл бұрын

    @@libberator5891 'x != null' is not always the same as 'x is not null' since you can overload the != operator... also, the last one just reads nicer 😊

  • @MidnightSt
    @MidnightSt2 жыл бұрын

    Oh. So Interfaces have now become almost classes, in the name of having one of their main points removed =D. "Nice". Changing an interface is difficult, because it breaks all implementors. YES, that's the point. It's a contract. Changing a contract SHOULD be difficult and anger everyone who is currently bound by it. That's the point of a contract. If you need to change the contract when it's already in use... You have failed at making the contract, and no amount of turning Interfaces into Classes will save you. The only thing that putting functionality into interfaces will do, is shoot you in the foot even further.

  • @SnakeEngine
    @SnakeEngine2 жыл бұрын

    Programmers who write code that a human can easily understand typically don't know how to write code that a computer can easily understand.

  • @InfallibleCode

    @InfallibleCode

    2 жыл бұрын

    That's an interesting point of view. In my experience, I haven't seen that. I've noticed that young coders tend to enjoy trying to write code that "feels" really technical -- like one liners and overly complicated structures -- and more experienced coders know how to express their intent in a more intuitive way. Just my take.

  • @DavonAllen92

    @DavonAllen92

    2 жыл бұрын

    i think a computer can ready any garbage you throw at it so long as its syntactically correct. weather or not its performant is another issue entirely, weather or not its secure is also another issue entirely. coding is communication, either to other devs or to your future self. so human readable over cute and complicated every time will yield less headaches.

  • @K3rhos

    @K3rhos

    9 ай бұрын

    Yes and no, it was true in the past because of the technical limitations of computers, nowdays if you're code is not fully optimized for a computer but way more readable for a human, it's still a better approch. In the past they're was a lot of bitwise operators magic, pointers magic and stuff like that to get some codes easier for the computer to compute and work with, but this is thing of the past, it's always cool to see how programming was and experiment a bit with old languages (like C, C++), but let's be honest, no one on earth would prefer to work with in mind thinking of how you need to create a 1ms more optimized algorithm just to get your computer happy lol !

  • @SnakeEngine

    @SnakeEngine

    9 ай бұрын

    @@K3rhos No, you have no idea how much modern software is slowing down computers. One major bottleneck of modern computers is memory speed, it is extremely slow. You can easly bottleneck the CPU by a factor of 100x if you don't take care how to write performant software. If you actually write just simple single-threaded code in assembler that crunches on tons of data, it will be still several times faster than doing the same thing in Unity utilizing DOTS and multithreading. Let that sink in.

  • @K3rhos

    @K3rhos

    9 ай бұрын

    @@SnakeEngine No, this is something I know about, I worked with C++ for multiples years, and also did a bit of assembly, I know that the closer you are from the machine language the closer you get something fast, but this is something that you CAN forget this days. C# is really powerful and fast, not as fast as C++ but it's still better to work with. And on Unity you can use ILL2CPP to get a compiled C++ executable at the end which can also increase performance. EDIT: If you care that much about increasing your performance, you will never program a huge project (or maybe you will do it but with a lot more time wasted in optimization), huge projects will be better if they are more readable and understable for a human than your tiny optimization you will get from your "clever" codes. What I'm saying here is, ofc you need to optimize your code to be the faster, but don't try to code like a nerd from the 90's, there is a limit between: Optimisation and rentability.

  • @apptemon
    @apptemon2 жыл бұрын

    Readonly member looks too dangerous to use. It generates garbage implicitly and implicitly changes behaviour

  • @Serotonindude

    @Serotonindude

    2 жыл бұрын

    that's why you get a warning when it does ^^

  • @batnikelam-mavzer443
    @batnikelam-mavzer443 Жыл бұрын

    ww

  • @lazysnail145
    @lazysnail1452 жыл бұрын

    So anything actually useful for UNITY developers? I watched the video and nothing shines to me as something game changing. Interfaces are now just abstract classes, read properties nobody cares, single line mess become even worse borderline unreadable, what else