2 Overrides every Unity Dev should Use #unitytips

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everybody in this video I want to show you two really cool Unity features that are built in that'll save you a ton of time if you know they exist the first one will really save you on animations if you've got a lot of characters or even more than one character and you don't like building up a bunch of animator controllers and the second one is something that I used to recommend people build on their own but then I saw Peter's video this morning and thought oh wow this is awesome I should make sure everybody knows about this since I just found out myself let's start with animation I'm building a game that has hundreds of characters and all of them need to animate but they all have very different animations this evilize animations are very different from this ladybugs or the Hornet or um any of these other characters that I've got here like this nice little mimic that wants to shoot out gold coins so one of the things I could do is build an animator for every single character and I found that that's what some people have been doing forever because that's what you used to have to do but there's actually a better solution if you at this thing you notice that in my animator all of the things are named after Orcs that's because when I use an animator I create a single one for all of my characters or at least almost all of my characters occasionally I'll have a different one for something very unique but for General characters I'll create a single animator and then for every sub character that has its own set of animations I'll just use an animator override controller you can create these just by right clicking in the unity folder hitting create and going to animation and then choosing override controller you give it the base controller mine is this orc Warrior one and then you assign the animations that are for that specific thing for instance with this mimic I've got an attack that came with the mimic I just drag it into what was my sword and slash now ideally you might want to start with a base set of characters that or a base character that has some nicely named animations but I knew what all of these were and the orc Warrior was my first character so I just built off of that and I can change it up later but this works it makes it very simple makes it really easy for me to just put in as many characters as I want really really quickly and not have to go create an animator controller if I had to do that every time I think I would probably go crazy and it would take me forever so use animator override controllers if you're not already doing that now now the other thing I wanted to share is also an override but this one's for audio I used to tell people to make a simple audio event script but now there's a new random audio thing that's built into the unity system in 2023 and unity 6 and beond so how do you use it well here's my Trooper shot you can see it plays this sound effect I can adjust the pitch right here and make it sound really weird but if I want it to vary what I can do instead is create this new animation or audio thing let's go right click I said animation that's okay we'll go find it audio there we go it's a audio random container and we're going to call this a laser blast and then we just take the audio clips so we hit the edit button first it pops up this nice little window audio random container and in it we can specify the audio clips so I'll find the audio clip that we were using there the clip's named explosion laser 2 and I got to say it's very difficult to navigate with this window cuz it's for some reason doesn't have a lock option so if you go select anything else it switches away from it super painful but vabs has made that a little bit helpful or a little bit handier with the little tabs down here showing my folders so I've got an explosion laser 2 I'm going to add explosion laser 3 to my audio clips and explosion laser 4 we can also play with pitch randomization so I can turn on the random option and add a little bit of a variation maybe make it get a little bit higher pitched if I can drag okay this in the window I feel like it needs just a little bit of love but I've got this converter set up or this container set up let's go assign it I just go find that impact that had the audio source and I can replace the audio Source notice that it says audio Source now instead of audio Source they changed it somewhere along the way and now it takes both types so I can put that audio Source in there and start shooting and get a little bit of variation I don't know that I really love my variation there but I'm sure you can get the idea you can play with it and do all kinds of different variation without having to cat it up yourself it's got some options for looping volume randomization and everything else again I think that the animation one is by far the biggest timesaver it's mostly because I usually play with a mute on I don't really think about audio but if you're doing that it's super handy to have that as well so thanks again to Peter for sharing that and if you want to learn more about this animation stuff or this game project that I'm working on make sure that you subscribe and drop comments down below if you got any questions or thoughts on animation or other new systems that people should know about that I haven't taught about yet or maybe don't even know about because things keep getting added semi secretly all right see you in the next video bye if you want to learn how to build multiplayer games and you're not sure how to start or how to get it done go to game. courses and check out the multiplayer Mastery course it's my latest course on Advanced game development where you'll learn how to build both a peer-to-peer racing game and a Diablo style RPG with inventory abilities and spells and a whole lot more and if you're a new game developer or just getting into the industry check out the game programmer course it'll take you from zero experience to the point where you can build and deploy a fun local multiplayer game you can enroll in both of them at game. courses today
Info
Channel: Jason Weimann
Views: 9,335
Rating: undefined out of 5
Keywords: unity3d, unity, unity gamedev, animation, unity animation, animator override, unity mecanim, unity animator component, unity animator controller, unity audio source, unity audio variation, scriptableaudioevent, unity audio, unity animations, jason weimann, gamedev, unity technologies, unity 6, unity3d game tutorial, #unitytips
Id: jEi8hrRBBNw
Channel Id: undefined
Length: 5min 32sec (332 seconds)
Published: Tue Apr 16 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.