UE5 | Dev Talk - Reusable Logic with Actor Components

  Рет қаралды 4,497

Michael Pattison

Michael Pattison

Күн бұрын

In this video, we'll explore two important concepts in Unreal Engine 5: Actor Components and the Size Map. Actor Components are reusable pieces of functionality that can be added to an actor to extend its behavior and functionality. The Size Map, on the other hand, is a tool that helps you optimize the performance of your game by managing the memory usage of your assets.
If you're a game developer or a UE5 enthusiast, you won't want to miss this video! So sit back, relax, and join us as we explore the exciting world of Actor Components and the Size Map in UE5.

Пікірлер: 22
@johnrex7108
@johnrex7108 8 ай бұрын
Pretty good description of how components work. And I appreciated the extra little talk about memory/space management as well. Good job, man.
@Rlador
@Rlador Жыл бұрын
Thank you, this is the first time I've heard about these methods of work. Now I'm starting to look at my drawings in a new way.
@1011theory
@1011theory Жыл бұрын
never thought about getting things like camera and spring arm from components. I really needed this, thanks!
@crazyguy7585
@crazyguy7585 Жыл бұрын
this is perfect things for good developers. try to avoid hard references and use soft ref as much as you can and check map size for ur all big blueprints and also use interface and dispatchers over events.🙂
@Wauzy
@Wauzy Жыл бұрын
Thank you for this wonderful explanation. I just love how you explain it and also how you do it.
@ERGDD
@ERGDD Жыл бұрын
I realy like your tutorials. U r realy helpful man. I hope u will live a good life. Thank you!
@ty_teynium
@ty_teynium 3 ай бұрын
Please where can I find that Camera component tutorial? I'm looking to do this for my game!
@mr-maschi
@mr-maschi 5 ай бұрын
I don't think that you are getting it right with the memory/space stuff. The Third Person Character is allocated only once in memory. If you work with the character reference in your component, then it is just a reference to an already allocated memory slot. So you neither use more disk space nor more memory in your component. Nethertheless, of course it is cleaner to not have the TPC referenced in your component. Btw. Your components are awesome !!!
@mpattym
@mpattym 5 ай бұрын
Thank you and yea, I think my explanation in this video was a little off. But yea, you're right. It only loads the class (and it's assets) once that every object would use so if an asset would already be loaded, having it show up the size map wouldn't be much of an issue.
@roryobrien6655
@roryobrien6655 5 ай бұрын
Thanks for this
@TekkitzMania
@TekkitzMania 10 ай бұрын
Wanting to ask, as others have pointed me in different directions so it's becoming a little confusing; Should we try to use timers instead of Event Tick when doing line traces for the interact component? Many folks say that it's bad for performance, unless you NEED to use Event Tick. Much appreciated for all the help!
@mpattym
@mpattym 10 ай бұрын
It's a good question. Generally for performing line traces to check if the player can interact with something, tick is fine. However, it can depend on what you're doing after the trace. Line traces themselves are cheap in terms of performance and instead it's what you choose to do with the data it finds (if any). Using tick to start with is usually best and if you find it's causing a performance hit during testing you can always switch to a timer where it does the check every half a second (or whatever you feel is right).
@DailyPaily
@DailyPaily Жыл бұрын
Interesting.
@vuce8321
@vuce8321 7 ай бұрын
Really nice video! 😃 I have one thing that I couldn't figure out how to solve properly. I have added an actor component to my thirdpersoncharacterBP. Inside the actor component I'm casting to the thirdpersoncharacterBP. I have a repnotify set up inside the actor component and it fires when a client connects. The repnotify uses the variable I set with the cast. How can I make sure that the thirdpersoncharacterBP is fully loaded before the repnotify of the actor component fires? Currently my repnotify seems to fail because it tries to access the variable from the cast that isn't set at that time. Do you have any tips for using Actor components for multiplayer? I couldn't really find any information to help me solve my problem. I looked at the "Actor Lifecycle" and noticed that the BeginPlay of the components fires before the actor itself, but I'm not sure how to handle that properly, if a client connects some time after the listen server.
@mpattym
@mpattym 7 ай бұрын
Making sure everything fires in the right order can be difficult. With what you've described, you could add an event dispatcher to the third person character, (something like 'OnBeginCompleted') and have the actor component bind to it (call a function that contains the logic you want to call) on its begin play. You would then have your character BP call the event dispatcher. It's hard to say the best course without knowing more about what you're trying to achieve.
@vuce8321
@vuce8321 7 ай бұрын
​@@mpattym The code I want to call is inside the onrep_ function of the repnotify. I do some action on the listening server and change a variable and when the client connects it receives the variable update and the onrep_ function fires (which fails, because the variable used inside doesn't seem to be valid at that time, because the thirdpersoncharacterBP isn't fully loaded yet). What you suggested would probably work, but it kinda makes the repnotify itself useless. Atleast for updating clients which aren't already connected. Tho it might be a good enough idea to do it that way. I could just have one function, which could then check the different variable states and update the clients. I'm pretty new to unreal and I'm trying to figure out what's the best way to do things, but it's kinda hard because there are always tons of possible solutions. 😅
@mpattym
@mpattym 7 ай бұрын
@@vuce8321 what's the variable that you try to use in the rep notify?
@vuce8321
@vuce8321 7 ай бұрын
@@mpattym it's the object reference to the thirdpersoncharacterBP. Inside the actor component I cast to it and then use the reference/variable inside the onrep_ function.
@mpattym
@mpattym 7 ай бұрын
@@vuce8321 You can use the 'get owner' node to get the actor the component is placed on. You can cast if needed. This might be a better solution.
Smart Data Storage -- UE5 Blueprints
14:50
Slightly Esoteric Game Development
Рет қаралды 5 М.
小路飞还不知道他把路飞给擦没有了 #路飞#海贼王
00:32
路飞与唐舞桐
Рет қаралды 76 МЛН
How Much Tape To Stop A Lamborghini?
00:15
MrBeast
Рет қаралды 124 МЛН
UE5 | Actor Manager System - Tutorial
24:41
Michael Pattison
Рет қаралды 1,6 М.
Real-Time Path Tracing in Unreal Engine 5 | Unreal Fest 2024
36:26
Unreal Engine
Рет қаралды 91 М.
Smart Reusable Blueprint Communication -- UE5 Tutorial
17:32
Slightly Esoteric Game Development
Рет қаралды 2,5 М.
Why Dependencies are Bad and How To Avoid Them In Unreal Engine | UE5
26:40
5 Tricks you (probably) don't know about Unreal Engine 5
10:44
Cinecom.net
Рет қаралды 395 М.
Epic's Unreal Optimization Disaster | Why Nanite Tanks Performance!
13:07
Threat Interactive
Рет қаралды 233 М.
UE5 Understanding hard and soft references - Be a better game dev
19:58
All Unreal Engine Nodes You Need To Know About
32:59
Unreal University
Рет қаралды 71 М.
Unreal Engine Interaction - Actor to actor communication tutorial
15:43
Gisli's game development channel
Рет қаралды 5 М.
I Struggled With Blueprint Interfaces for Years!! (Unreal Engine 5)
16:48
Glass Hand Studios
Рет қаралды 189 М.
小路飞还不知道他把路飞给擦没有了 #路飞#海贼王
00:32
路飞与唐舞桐
Рет қаралды 76 МЛН