Game Architecture Tips - Unity

  Рет қаралды 146,716

Dapper Dino

Dapper Dino

Күн бұрын

Package: github.com/Dap...
Join Our Community: student.dapper...
-----------------------------------------------------------------------------------------------------------
Just Here To Plug My Social Media Stuff:
/ dapperdino
/ dapper_dino
/ dapperdino4
/ dapper-coding-23139965...
github.com/Dap...
/ discord
-----------------------------------------------------------------------------------------------------------
If you liked the video then please respond with a like and a subscribe to show your support for the channel and I'll repay you by creating more tutorials for you to enjoy :D

Пікірлер: 141
@arsenicuma5200
@arsenicuma5200 5 жыл бұрын
Yes, would like more about design patterns
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 5 жыл бұрын
Sure thing :)
@EinTypOhneHandle
@EinTypOhneHandle 4 жыл бұрын
Wow, a coding tutorial by someone who actually knows what he is doing. Instantly subscribed! Keep up the good work!
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 4 жыл бұрын
Thanks for the sub! Glad you are enjoying the content :D
@fablouping5292
@fablouping5292 4 жыл бұрын
Thanks, mate! There are a lot of tutorials on Unity, but none of them deal with the correct implementation, there are small, non-optimized, quick to develop games, which is good to start with, but going further is harder to find. So thank you very much!
@warven2211
@warven2211 5 жыл бұрын
I really liked the idea of adding a layer of abstraction between Unity and C#. I'll be sure to start using architecture like this.
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 5 жыл бұрын
I hope you manage to see the benifits :) Just don't go overboard, not every monobehaviour needs to be like this, only when it makes sense to be
@callindrill
@callindrill 3 жыл бұрын
As a professional c# developer looking to learn unity, it's infuriating watching all of these tutorials making poor architectural and design choices and never mentioning anything about how this might look in a production system (or doing it so quickly that it isn't helpful). Thank you for this!
@BobrLovr
@BobrLovr 3 жыл бұрын
Well first off you're going to need to throw a lot of your previous conceptions out. Game code does not look like your pretty SOLID code. We sacrifice "standard practice and clean maintainable code" for performance, and other pragmatic reasons. So if you're a code queen this might not be the road for you. So you're going to have to stop thinking about classes and polymorphism and all that nonsense band start thinking in components and data
@dkfury
@dkfury 3 жыл бұрын
@@BobrLovr No, amateurs sacrifice maintainable code. Professional game devs are focused on clean, maintainable, scalable code otherwise any large project becomes a nightmare to add to and riddled with bugs. Good architecture and coding is crucial for professional game dev if you don't want to be burning your money/time. Most videos are made by students/amateurs hence their lack of structure or good practices. Components originated in OOP for clean, flexible code that is easily maintained. Data-oriented design just added the caching performance improvements on top. Also, most gameplay code doesn't need DOD/performance-first mentality, just engine code and process-heavy systems.
@ThePancakeJedi
@ThePancakeJedi 3 жыл бұрын
The real problem here is that no professional c# developer wants to devote any serious time to educate amateurs. I'm looking forward to your tutorials.
@eclipset.9683
@eclipset.9683 3 жыл бұрын
I'm glad he doesn't stop every two seconds to explain what a class is or what each and every data type is, etc... It's concise advice focused on the big picture part of setting up your code. I get why a lot of videos go over that basic information, but as someone who's new to Unity and C#, but can already code in other languages, it gets really tedious after a while. It only takes a few minutes to learn what those things are, but it takes a lot more to learn good practices when actually making your own project.
@TheKr0ckeR
@TheKr0ckeR 2 жыл бұрын
@@BobrLovr lol....
@scottmiddleton143979
@scottmiddleton143979 Жыл бұрын
You get it! Im an Android Developer learning Game Development and struggling to find good videos on architecture and keeping things testable. Nice to see example on how these principles are applied in Unity development. Thanks a lot
@HadiLePanda
@HadiLePanda 5 жыл бұрын
Would love to see more of this kind of architecture tips ^^
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 5 жыл бұрын
Lots of people seem to be interested so I'm definitely going to continue :)
@RyeArtDenmark
@RyeArtDenmark 4 жыл бұрын
Totally! Awesome video. Very basic stuff, but very cleanly described, and gives good "mass" to the theory.
@BeastieKarlbovsky
@BeastieKarlbovsky 5 жыл бұрын
More videos about Design Patterns? Well, if they are all concise and well made like this one then...yes, pleeeease !!
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 5 жыл бұрын
Sure thing, I'll keep them coming :D
@yami5574
@yami5574 4 жыл бұрын
I'm mad at youtube for not letting me know your channel existed until now. You're great at teaching and you deserve way more views on your videos. Keep it up!
@DanceWithFlame
@DanceWithFlame 2 жыл бұрын
Two years latar and it still helps :D thank you for this tutorial!
@UnMeilleurMonde
@UnMeilleurMonde 2 жыл бұрын
I wish there were more content like that on YT as game architecture is the stuff everyone should learn before starting developping a real game. If you start a game without thinking about your architecture, there's a point in your progression where you will be forced to spaghetti code and your game will become more and more unmaintenable as it grows. Found a bug ? Good luck to identify it if you didn't put any layers in your code logic. Thanks for this video man
@atilacorreia
@atilacorreia 3 жыл бұрын
Your parameter "duration" for the timer class should be "durationInSeconds". It's also a good practice to use OnDestroy and remove the delegates you assigned and nullify some instances you created and no longer need it. Would be interesting to see a situation where 1 Monobehavior ticks many different objects, since it's a common performance situation with Unity where you avoid many objects updating individually (to avoid reflection call of Update).
@beardordie5308
@beardordie5308 5 жыл бұрын
I like this kind of stuff. A little request: your volume is pretty low, so I have you cranked, which makes the volume of ads deafening. FYI.
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 5 жыл бұрын
I've just increased my OBS mic level so next video should be easier to hear :D
@iedgaming
@iedgaming 5 жыл бұрын
why is this in my recommended 5 mins after it was posted, yt isnt supposed to actually work well
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 5 жыл бұрын
Good job YT :D
@ZorrroUK
@ZorrroUK 4 жыл бұрын
This is the kind of stuff that I need to know but my brain tries to tell me I'll never understand it, but I'm sure I'll get there
@GameDevNerd
@GameDevNerd 3 жыл бұрын
A lot of people who make tutorials don't really know C# and have no other experience with it apart from simple Unity scripting. So they really don't know anything about OOP and design, just attaching MonoBehaviour scripts to GameObject. Kind of bugs me when I'm watching tutorial videos to learn the Unity API and no one seems to know basic C# concepts lol. But this video was refreshing. I try not to use many MonoBehaviour objects unless they actually need to hook into Unity directly. I've been thinking about creating my own sub-engine to connect to Unity and manage some extra things and deal with syncing multiple threads.
@Jomoko89
@Jomoko89 2 жыл бұрын
Looks really useful and I may use some of these. I'm mostly a hobbyist so most of my time is used on getting things to work. It's nice to know that I can still do that part and then come back and refactor my code using this type of architecture.
@lD3STlNY
@lD3STlNY 5 жыл бұрын
Really liked your video, good pace, only the necessary off-topic content, nice example... :D I am currently in my final semester at the Uni, did a few hobby projects (mostly in Unity) and I am at the point like half a year now when I want to learn in depth how to write code, that does not get messy a few thousand lines in, especially in Unity... but I have found that there is not many Unity content creator that does not aims it's content for beginners, like Brackeys. Will check out some other vids from you, appreciate your work for the community. Wish the best! :D
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 5 жыл бұрын
I'm glad you enjoyed the video and I wish you good luck with the end of Uni :D
@fokeyjo
@fokeyjo Жыл бұрын
I got distracted wondering if it's more efficient if you have a lot of timers in your code that you register them with a central class that has your Timer class. If you implement it so that it's costly to add, by placing new timers into an ordered list (or part-ordered or whatever, lots of optimizations possible). Then, in the update loop, you only need to make one check for the soonest timer to fire. when it fires, you pop it off, and keep repeating the check on the new soonest for any other timers that should fire until there aren't many more that should fire.
@boroborable
@boroborable 5 жыл бұрын
I think this is what I requested in your previous video so thanks for that. Except DLL part which not really crucial but I believe making many modular DLL's can make code compilation faster especially in big projects. And I have almost same timer code in my projects tho it's using delegates. Well, there are many clever and different solutions to use and learn while also engine capabilities and workflows are changing with DOTS. Thanks for the video, keep them coming :)
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 5 жыл бұрын
Yep :D Can't wait for DOTS to be more user-friendly (or at least more documentation and guides) hopefully around the time it comes out of preview and into production but it will probably end up taking longer haha
@KEM4OFFICIAL
@KEM4OFFICIAL 5 жыл бұрын
I totally agree on this but definitely, I should recommend making an integration test together where your specific timer class works together with a MonoBehaviour or w/e else it has been used.
@Sei783
@Sei783 3 жыл бұрын
Why do two separate checks for whether the timer is 0? You check once for if the time is 0 and then later you check if it's greater than 0 with the else setting it to 0 if it runs lower. But you don't really even need the first check. The second check handles both conditions. The same is true if you checked less than or equal to 0. In that case you would set the timer to 0 and then return.
@Dxpress_
@Dxpress_ 5 жыл бұрын
The only downside I can see with this is having to re-write the same fields twice - once for the C# class and once for the MonoBehaviour that wraps around the C# class. Though this wouldn't be a problem if Unity would just allow properties to be serialized in the inspector; then you could just write the properties once in the C# class and have the MonoBehaviour annotate it with [Serializable] to expose its properties in the inspector. I'm really hoping this is something Unity has planned for the future, because this isn't the only case where being unable to serialize properties causes annoying issues.
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 5 жыл бұрын
The only downside I see is that yeah, but it's no big deal anyway really, it's just a different form on dependency injection I guess haha
@JackFastGame
@JackFastGame 3 жыл бұрын
@@DapperDinoCodingTutorials Is it really not a big deal? I have a lot of classes that do some Unity-independent work and I don't want to create a MonoBehaviour for each of them for just being able to make prefabs and set some serialized fields to the components.
@ThisisMyNamevuduydu
@ThisisMyNamevuduydu 2 жыл бұрын
You can avoid writing the same fields twice by simply define a new serializable class that declares all those fields, put it in the monobehaviour as a serializedField, and then passing it into C# class.
@Judge37
@Judge37 2 жыл бұрын
Try defining structs containing your data with the serializable Attribute, you can edit those in the inspector and reuse them in both classes.
@bpansky
@bpansky 2 жыл бұрын
@2:20 "so if you want to use code just as code, and not scene-related code" i don't get it, why would anything not be "scene related"?
@tristanhoweth4281
@tristanhoweth4281 4 жыл бұрын
Your tutorials are GOLDEN. Thank you so much for your efforts in teaching.
@piraloco5864
@piraloco5864 6 ай бұрын
no way! another fellow dino! (also come from a dino family!)
@kleydermendoza4771
@kleydermendoza4771 3 жыл бұрын
Thank you, i was needing a video about software architecture in video games, so THANK YOU :D
@amac333
@amac333 3 жыл бұрын
This was great. Having the example at the real world use case and benefits was nice. I wonder if leading with a few of those before getting into the how-to of it would be better format, set that hook kinda deal. Thanks.
@KikProfik
@KikProfik 3 жыл бұрын
Great video, easy to understand and follow. Explanation is simple and to the point. Deserves a sub 👍
@TheJP100
@TheJP100 4 жыл бұрын
huh, would not have expected to see anything that would improve my coding style in general, thanks man (y)
@welltypedwitch
@welltypedwitch 5 жыл бұрын
Could you maybe look into some more functional Game patterns? I've recently tried it a bit and I have to say, seperating your side effects from the rest of your function is REALLY helpful.
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 5 жыл бұрын
I've never looked into functional programming for game dev. Sounds interesting though! I'll see if I can make use of it :D
@pythonxz
@pythonxz 3 жыл бұрын
That heap is going to be huge.
@maxg5196
@maxg5196 2 жыл бұрын
I don't know much or have much exposure with unit tests, but the idea seems intriguing. The large majority of time I spend programming isn't spent on the writing of code itself, its more the debugging and playtesting of the game. I wonder how much of that time I could cut down on through unit testing? The thing is, there seems like a lot of situations where unit tests don't really tell you a change needs to be made or an error occurred. Like with playtesting and tweaking AI behaviour, you kind a need to play the game to get a feel of how the entity is behaving to know if it needs a change or not. But maybe it could help avoid straight up error and bugs, like yesterday I spent 45 minutes trying to fix a null reference error, only to realize that it was a totally different variable that was throwing the error, and after that I fixed it in 5 seconds.
@barnesnplebian6462
@barnesnplebian6462 3 жыл бұрын
This is a pretty cool way of setting up things
@TheOneTaboo
@TheOneTaboo 3 жыл бұрын
I need to learn about events and function invoking and getters and setters, Wish I had like a roadmap to progressively acquire the right programming tools
@robosergTV
@robosergTV 4 жыл бұрын
RemainingSeconds can be negative, you should check with
@archentity
@archentity 2 жыл бұрын
That dino is indeed quite dapper...
@nikunjkareliya7304
@nikunjkareliya7304 3 жыл бұрын
Great example of using design pattern! Keep it up
@RichyAsecas
@RichyAsecas 4 жыл бұрын
I do think this is the first video I see about actual use of clean architecture principles applied to Unity. Thanks so much, so helpful. It would be really interesting to dive into that particular project in order to see your architecture. P.S. Just concerning my English learning. What accent have you from? I'm not native and I'm unable to identify it.
@idegogame181
@idegogame181 5 жыл бұрын
Why is every Brit on YT a game developer? Nice channel so far, keep it up and you'll have a bunch of subs in no time. EDIT: Oh good god you have a ton of videos. Gonna have to browse for a while. Very nice.
@neozoid7009
@neozoid7009 Жыл бұрын
thanks for this awesome helpful tutorial yes we need more this kind of video... may be I am too late
@Arrow5587
@Arrow5587 5 жыл бұрын
I love your Game Architecture videos. Can you suggest some blog or books on the same. Pls
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 5 жыл бұрын
I don't have many in mind at the moment but if I think of any I'll try to remember to let you know :)
@Arrow5587
@Arrow5587 5 жыл бұрын
@@DapperDinoCodingTutorials Thanks man😃
@HaramLord
@HaramLord 5 жыл бұрын
@@Arrow5587 Also, if you join our website, we'll have some nice resources to go through. We will soon be adding more content! student.dapperdino.co.uk
@ThomasBCharlie
@ThomasBCharlie 3 жыл бұрын
Wouldn't a timer be best used with a coroutine? Ticking a bunch of timers every Update feels excessive
@JoshyHJoshy
@JoshyHJoshy 3 жыл бұрын
Quite an informative video, as well as enjoyable. Thank you!
@crimson7632
@crimson7632 Жыл бұрын
Is the community link down?? any updates !! would be very much intrested in joining that ..
@baconchaney
@baconchaney 5 жыл бұрын
Really useful video thank you! Only minor issue is the audio on the video's really quiet. If possible can you increase your mic volume in future please!
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 5 жыл бұрын
I've already gone ahead and increased my OBS mic level so it should be better for next video :)
@baconchaney
@baconchaney 5 жыл бұрын
@@DapperDinoCodingTutorials Awesome thank you!
@FanglinTan
@FanglinTan Ай бұрын
Urmmm I'm not familiar with cs and programming/ architecture, so... Why use the Timer() C# class in the video, but not coroutine and yield return new waitforseconds() ?
@riery2762
@riery2762 9 ай бұрын
I'm a developer and I really like this video. How can I get more design patterns in unity?
@TwilightSatium
@TwilightSatium 3 жыл бұрын
why not using fixed update? then he would not calculate like 60 times per second but in the physic step. ergo more performance? because you use deltatime anyway
@RyeArtDenmark
@RyeArtDenmark 4 жыл бұрын
Hey, awesome video. I just subbed. I would love to see some stuff on what you mentioned how to do the switch from enums to scriptable objects, which you mentioned in the end together with interfaces. Do you have a patron page?
@yoimokacc
@yoimokacc 4 жыл бұрын
More of this, the UI stuff ect. is great but can we get more videos like this? Maybe stuff on making a Player/NPC that use the same base class ect.
@curt88469
@curt88469 2 жыл бұрын
Thank your video,it is really useful😊
@ekagaurangadas
@ekagaurangadas 3 жыл бұрын
Thanks for the video. You used to have a Udemy course going Thru the Open Project 1? I saw the link on the codecks cards but I can't find it. Was removed? I would really like a tutorial/course that goes thru the design of that project, looks really well made.
@MichaelBryne
@MichaelBryne 5 жыл бұрын
Thanks very much for this, great videos and definitely subscribed, do you have any videos on the process for splitting out the project into seperate assemblies / dlls ?
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 5 жыл бұрын
Usually I just have my game logic in a dll and then unit tests as a separate dll so that when I build I can exclude the tests.
@FICHEKK
@FICHEKK 5 жыл бұрын
Great video man! Learned some new things, so I wanted to return the favor by sharing some tips: 1) Never compare float/double values using the == operator, because of the precision error. Proper way is Math.Abs(value1 - value2) < epsilon. I know == will work in your example, but it is just not a good practice. 2) According to Microsoft, unit test names should be of format MethodName_TestScenario_ExpectedBehaviour. So, your test should be called Tick_TimerEnds_EventIsRaised, instead of TimerEnds_EventIsRaised. 3) Private fields should start with underscore for better code readability (private string _text). 4) You can assign in a return statement: return movement = new Movement(controller); Thank you for great videos!
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 5 жыл бұрын
Thanks man, I'll give those a go :D Might take a while to pick up using underscores for privates. I'm used to using underscores for private read-only fields rather than all private fields
@sergiorello9854
@sergiorello9854 3 жыл бұрын
I would pay for a full course on this topic
@clamum
@clamum 4 жыл бұрын
I get this error in Visual Studio on the line for "timer.OnTimerEnd += HandleTimerEnd();" : Cannot implicitly convert type 'void' to 'System.Action'. If I make the method in the Unity class the following: "private Action HandleTimerEnd() { onTimerEnd.Invoke(); }" that works, but I still get an error on that method saying "not all code paths return a value" since it needs to return an Action (I have no idea what that is). I'm also getting an error on the following line: "onTimerEnd.Invoke();" in the HandleTimerEnd() method in the Unity class (TimerBehavior in your code; I just put this code in my Unity MonoBehavior class, without the wrapper). The error is that "onTimerEnd" is null because it's never instantiated in the Unity code (or wrapper in your code), it's just defined as "private UnityEvent onTimerEnd = null;" My code is the same as yours, I looked at your code on GitHub. I just put the code you have in your TImerBehavior class right into my Unity MonoBehavior class.
@gamezort8724
@gamezort8724 2 жыл бұрын
I’m just learning about events in unity and I’m always seeing events being subscribed and unsubscribed to. In the timer example, would you unsubscribe to the OnTimerEnd event using -= in an OnDestroy/OnDisable method? Or am I completely off base?
@JoshLathamTutorials
@JoshLathamTutorials 2 жыл бұрын
0:50 Latham is pronounced with the A from late. L-ay-tham. or L-ay-th-u-m with the U from thumb. Depending on where you're from.
@easycodeunity3d14
@easycodeunity3d14 3 жыл бұрын
Wow, timer, nice. But what would you do if this timer is a part of mobile game where users each time fold the game window once they got a new message in some kind of messanger? Timer will be paused as well as game itself. How to handle this by the proper way?
@robertnagy3942
@robertnagy3942 2 жыл бұрын
I need to make the database for a unity game, and the game has a bunch of different data, attributes, etc. I want to store these as one huge string VARCHAR(300) in SQL, should I do that, or should I make like 30 different columns in the database? which one is more efficient?
@ApacheGamingUK
@ApacheGamingUK 4 жыл бұрын
Could you give an overview of how to set up for TDD and Clean Architecture within Unity? I'm coming into Unity Games Development as a highly experienced C# developer for Web and Desktop Applications. I've been highly concerned that Unity seems to break C# Coding Standards with regards to naming conventions; intellisense looks horrible, and there's no XMLDocs. Also, the accepted use of public fields is highly concerning, as it breaks encapsulation. So far as I can see, this would be your structure: Domain: POCO classes, base abstraction layers. Application: Business Logic for specific projects. Infrastructure: Unit Tests, Integration Tests, Assembly-CSharp (Unity UI Adaptor). You should be able to swap out your Assembly-CSharp front end, for your Unit Test Suite, and be able to test all the business logic; none of which depends on Unity. Then integration tests give coverage for your implementation of all the Unity code-behind. But, where would you write your first uncompilable tests? I prefer Plan-Do-Study-Act to Red-Green-Refactor, it's easier to understand and explain. But, what's the best way to implement that PDSA pattern within Unity? Is it better to start with a failing integration test, and fall down through the layers?
@BobrLovr
@BobrLovr 3 жыл бұрын
Lmao, if you're a code queen I have bad news for you. Game code isn't pretty, we are pragmatically tossing your favorite coding standards out in the name of performance , optimization and readability. Stop thinking about your SOLID crap, stop thinking about polymorphism and all that nonsense. Start thinking in components and data oriented design. You don't need to have a heart attack or get "concerned" when using public fields because that's what they're there for. Use them embrace it, if it works it works , you don't have to be part of the "cool club" anymore . You don't have to impress people anymore by your over engineering with oop
@ApacheGamingUK
@ApacheGamingUK 3 жыл бұрын
@@BobrLovr No thank you. I'll stick to elegant design. I'm now modding for a game written in C#, but written by Java programmers. A lot of the cosebase is copypasta from Java, so still has all the Java coding standards, that jar horribly with C#. However, I'm able to code in my own way, and a lot of the refactoring, I've been able to take back to the developers, and have them implement it to streamline their codebase. We've seen huge performance gains as a result. Elegance in design is what I strive for. I agree that SOLID is pretty redundant in C#. It's a relic from Java. Same as all the architecture arguments, which is mainly an argument over folder structure, with fancy terms. Clean Architecture is the same. I didn't fully appreciate that when writing this post. It's mainly for Web Developement. With my mods, I've developed my own Core, which is then used within each mod. I rely heavily on polymorphism, generics, and at least some of the key principles. Liskov's substitution, interface segregation, and dependency inversion, and DRY. Not so much SRP, because a lot of the mechanisms are so indepth, and I've never been keen on Open/Closed anyway. I think it's too restricting. Especially when working with a volatile codebase. Also, a lot of what I do, I use Harmony for, so O/C is redundant. I'm not willing to toss my own programming experience and culture into the fire, just to lower myself to the inferior standards of others. That would be a massive mistake for everyone involved.
@BobrLovr
@BobrLovr 3 жыл бұрын
@@ApacheGamingUK then you're a dogmatic fool if you're not willing to adapt. And we known what happens to things that don't adapt. (It's not inferior practice, it's just different tools for different jobs) you wouldn't finish a concrete warehouse the same way you finish a sidewalk would you? Would be a complete nwaste of time and resources. The side walk needs to be finished with a broom so it's pretty and so it's grippier , a warehouse just needs to be functional and doesn't need to be grippy so it can just be finished with a sponge and a trowel. Like wise with web vs game. Web is constantly being worked on by new people. Games are worked on for a set time then done with aside from some updates.
@ApacheGamingUK
@ApacheGamingUK 3 жыл бұрын
@@BobrLovr I am willing to adapt. I take the best from new experiences and skillsets, and add them to my own. Any knowledge that is superseded, is necessarily inferior, and is therefore dropped. As I say, Resharper will not allow me to code as badly as the developers of some of the game that I write mods for. That's a good thing. Why would I not use every tool available in my arsenal?
@filipathtc
@filipathtc 4 жыл бұрын
More videos like this please!!!
@jorhoto7064
@jorhoto7064 4 жыл бұрын
Hello, I was wondering, what if you want your timer class (and others) to be reusable among your projects or even sell it as an asset store? What would be the best way? Maybe doing it in c# and publish them in the form of dlls? Thanks for the great video. Liked and subscribed!!
@pythonxz
@pythonxz 3 жыл бұрын
Is there a reason you initialize the UnityEvent to null?
@TheKr0ckeR
@TheKr0ckeR 2 жыл бұрын
I actually dont like UnityEvents. It feels like coupling. And we can't really trace it down like in IDE. Since Unity 2021+ also has very long compile times.. It really feels better to just use Actions.. And UnityEvents are only Scene referenced. So any prefab that spawns later wont be able to subscribe to it. :(
@lisualcam
@lisualcam 4 жыл бұрын
It is incredible!! 😀
@kappelikapeli1401
@kappelikapeli1401 2 жыл бұрын
I didn't ubderstand any of this haha. Maybe I'll come back to this later.
@doge9203
@doge9203 3 жыл бұрын
makes perfect sense!
@divainsyoutube4254
@divainsyoutube4254 3 жыл бұрын
First of all, thanks for all your tutorials and hard work! Much appriciated! I have a question to ask. In your "Timer" class, you're passing Time.deltaTime as an argument so you won't have to use the "UnityEngine" namespace, but in your "Movement" class you're clearly using it, what's the different? Why using the namespace in one and not the other?
@RedLionYTB
@RedLionYTB 3 жыл бұрын
Idk if this will still help you, since it has passed 6 months from the comment, but ill respond anyways. At 5:40 he said if you can avoid using unity's namespace, it will help a lot, but in the case of the Movement class he needed a reference to the CharacterController and thats why he used it. But I dont think this is the way to go with unity.
@BrokenNat
@BrokenNat 3 жыл бұрын
I highly recommend playmaker...
@DeathxStrike18
@DeathxStrike18 4 жыл бұрын
For the timer couldnt you have just used a sterilizedfield private rather than public with a get
@gregorytippett9692
@gregorytippett9692 3 жыл бұрын
Where are your SOLID videos? Looked through your channel but not finding them.
@beezow7113
@beezow7113 3 жыл бұрын
kzbin.info/aero/PLS6sInD7ThM21gSGGFC1mQBL9nqlmUQOo
@thibaulttruffert3836
@thibaulttruffert3836 4 жыл бұрын
Hi ! I'm really new to Unity and I want to thank you a lot for this video (and the others). I have two questions : - Why using private serialized fields in your behaviour instead of public ones ? - Why using property for RemainingTime instead of a public variable (again). I'm aware of encapsulation principe but isn't it a bit overkill since get/setters aren't actually doing anything ? Again, thanks a lot. Just asking.
@micaiahstevens8840
@micaiahstevens8840 5 жыл бұрын
pssst check out [SerializedReference] in 2019.3. For your interface woes.
@micaiahstevens8840
@micaiahstevens8840 5 жыл бұрын
[SerializedReference] List CheckMeOutInTheInspector = null;
@TheOneBurch
@TheOneBurch 5 жыл бұрын
Broskie for real though do this. return movement ?? new movement(controller);
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 5 жыл бұрын
I'll give it a go, it's just that Unity is behind on C# versions, there are quite a few shorthand techniques that aren't compatible with Unity. I'll try using it in the future :D
@lassipls
@lassipls 4 жыл бұрын
I usually speed up tutorial videos but JESUS CHRIST you talk fast!
@littleface7060
@littleface7060 3 жыл бұрын
Dipper Dino
@drtrouser
@drtrouser 2 жыл бұрын
good content. you would really top it off if you stepped up your audio quality and video aesthetics
@unitygamer8261
@unitygamer8261 2 жыл бұрын
While watching the video I thought it was 1.5x speed lol
@lemonke8132
@lemonke8132 4 жыл бұрын
15:32 lol
@RespriteApp
@RespriteApp 3 жыл бұрын
make simple complex
@sebastianwelke5739
@sebastianwelke5739 5 жыл бұрын
why not just "invoke(onTimerEnd, duration)" i dont see the need for the timer class^^
@ammyvl1
@ammyvl1 3 жыл бұрын
it's a tutorial on architecture. The class is an example
@Subrata157
@Subrata157 3 жыл бұрын
Make tps multiplayer mobile game plz
@EveryGamerLife
@EveryGamerLife 4 жыл бұрын
who's here after seeing yaderedev's code
@HAWXLEADER
@HAWXLEADER 4 жыл бұрын
But all this boilerplate code makes it really hard to understand what stuff does.
@SojitraManav-ym1ht
@SojitraManav-ym1ht 12 күн бұрын
who let him cook
@Macalaka
@Macalaka 5 жыл бұрын
Im so confused .. il have to rewatch this when im a little more learned in coding.
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 5 жыл бұрын
Good luck with the learning. I hope this video manages to help you out at some point in the future :)
@hajperdev
@hajperdev 4 жыл бұрын
Honestly I dont understand most, Im working with Unity for past 8 months and never actually used C# pure classes, constructors etc /; Im a awful programmer lmao
@BobrLovr
@BobrLovr 3 жыл бұрын
You're not an awful programmer, you're a unity programmer. And why tf would you need to use constrcutors or properties in unity lol. Unity is an ECS frame work, were not dealing with classes, were dealing with components you never need to use a constructor. And properties we don't need them, we just set our variables to public and deal with it in the inspector or use [serializeable] . What this guy is trying to do is inject work flow from other frameworks into a unity framework and it's just uneccesarry bloat that defies everything that component based architecture stands for
@westparezal
@westparezal Жыл бұрын
== for float realy bad idea ;)
@alexanderhuliakov6012
@alexanderhuliakov6012 3 жыл бұрын
Sorry, the video is good and all, but the title is misleading.
@paulkerrigan9857
@paulkerrigan9857 4 жыл бұрын
New programmers always seem to wanna add several unnecessary layers of abstraction.
@i_am_reshad
@i_am_reshad 11 ай бұрын
do you have course
Game Architecture Tips - Event Driven UI - Unity
17:08
Dapper Dino
Рет қаралды 15 М.
The 6 Design Patterns game devs need?
24:20
Jason Weimann (GameDev)
Рет қаралды 377 М.
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
Improve Your Unity Code with MVC/MVP Architectural Patterns
15:32
Unity Architecture for Noobs - Game Structure
16:24
Tarodev
Рет қаралды 213 М.
The 8 Game Code & Architecture Mistakes We ALL Make - Unity3D
25:45
Jason Weimann (GameDev)
Рет қаралды 123 М.
SIMPLE Tip For Better Unity Game Architecture
12:57
git-amend
Рет қаралды 42 М.
Software Architecture in Unity
7:13
Jason Storey
Рет қаралды 125 М.
The Power of Scriptable Objects as Middle-Men
17:41
samyam
Рет қаралды 134 М.
Making an Entity Component System for my game engine
4:50
CLEAN Game Architecture with ScriptableObjects | Unity Tutorial
13:12
Sasquatch B Studios
Рет қаралды 23 М.
11 Things You (Probably) Didn't Know You Could Do In Unity
13:49
Game Dev Guide
Рет қаралды 159 М.