Unreal Engine Optimization: Hard and Soft References

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
yo hello guys and welcome back to this new engine tutorial optimization series and today we are going to talk about run so guys you need to know that every Plus on your game or in engine game uh take some Plus on your memory in the RAM memory okay guys and to know each element or each class how much memory it's taking you right click and go to size map and here you can see each element that your in my case my character blueprint uh my character blueprint is handling or handles so here I have uh U uis are taking20 megabytes uh a drone blueprint which is taking 170 mbes knowing that the entire character blueprint is taking 274 so for example here the Drone is taking too much memory and uh my game here is an FPS game so my my drone is not used all the time okay so what I need to do is to optimize uh my size mod okay guys how to do this we are going see we are going to see this together so guys here you can organize our classic way of spawning element and here I have uh the key uh key button input uh spawning an actor which is a drone okay in this way in this case it's a drone and uh this is why my character has this drone loaded in its memory you can see that if I change this to nothing like this and click save my drone still here why guys because this note has already loaded the Drone before so if I delete it now I click save sorry I click save go back here and you can see that it's not not here anymore so keep in mind that every note that was uh referencing or linking to blueprint in my case drone blueprint uh still has the the blueprint uh loaded in its memory so you need to uh reset all the nodes that you want to optimize this is a thing so now you are going to uh ask me how to spawn a drone without uh uh occupying all this memory so guys we are going to use this two notes Here the ass sync load class assets here and in the asset class you search for your blueprint in my case it's drawn but you can see that it's a different class why because this is a soft class okay guys you can read this asset you can read here asset class object soft class referencing okay the classic way that we used before here you can see that the object class you want to construct it's an actor class reference class okay guys so it is a hard referencing it is heavy uh what you going to you are going to do now is you assing load class assets you use the asset class asset load class asset and combine it with class uh cost two back to class here okay guys you link the class here the output must be the complete when you press key go to Stone actor and this is our now I will just put the transform location and now you can see that it is working I click key I I still have have my drone okay this is my drone but here in the size map I don't have the Drone and it's heavy uh memory okay guys so also you can right click go to reference view here you can see all the hard reference references that our character blueprint is linked to uh for example here there is animations on blueprint static measures materials uh user interfaces okay the white string are the heart references but here I have my drone but it is in pink the pink strings are soft ref referencing okay guys so you are going to ask me why uh do we not just uh put all the references on soft mode uh this is because guys the soft reference is uh a slow operation you can see here we have the clock icon uh the asent asnc load class assets it is uh a slow operation so all the element that you are using in permanence on your game for example in my case my weapon you can see this is an FPS so I need to have my my weapon always uh loaded okay all the element that you you are you are using all the in permanence need to be on hard references referencing because they must be on the memory already you just use them when you need it and the elements that you are not using all the time for example a grenade or a drone in my case you use this way of spawning in order to save some Ram okay guys so uh that was pretty much everything for this video uh make sure to uh subscribe and hit the like the like button and see you next video
Info
Channel: Unreal Dystopia
Views: 989
Rating: undefined out of 5
Keywords: Unreal Engine Optimization: Hard and Soft References, the right way, unreal engine, ue4, game development, unreal slow load times, learning hub, tutorial, unreal engine 5, ue5 beginner tutorial, be a better game dev, unreal engine optimization hard and soft references fr, blueprints tutorial beginner unreal 5, Unreal Engine 5, Unreal Engine 4, epic games, references francais, soft reference, hard reference, ram saving, unreal engine optimization
Id: NhI7wSJrHlg
Channel Id: undefined
Length: 6min 0sec (360 seconds)
Published: Tue Feb 20 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.