Unreal Engine Copies VS References EXPLAINED

  Рет қаралды 1,009

The Game Dev Cave

The Game Dev Cave

Күн бұрын

Пікірлер: 8
@Wrexthor
@Wrexthor 6 ай бұрын
Love videos like this that cover basic but often overlooked things, please keep doing it!
@thegamedevcave
@thegamedevcave 6 ай бұрын
Thank you! Will do!
@juggernautx1779
@juggernautx1779 6 ай бұрын
Finally someone covered this properly!
@philipberick2874
@philipberick2874 22 күн бұрын
I am really sorry if this is a dumb question but I am failing to understand the advantage here.. you are still "getting" the variable at a point and "setting" it at another point, in both examples (the usual way and the "pass by reference" way.) So what is the real point? Is it more efficient for processing maybe? Or, is it something that is not really an advantage for such a simple example but would be much more efficient and powerful for some complex function?
@thegamedevcave
@thegamedevcave 22 күн бұрын
with a pass by ref you can set the new value *inside* of the function, if you dont use pass by ref, you need the function to return the new value and then manually set it *outside* the function every time you use it. Let's say you have a shop with a function for "Buy Item" that takes in a money variable from the player. a function called that, you would assume takes care of subtracting the money by itself, it would be a little weird if it just calculates the new value of money and then makes you set it afterwards. that can become really tedious if it's a function that you use a lot. Like many things in programming, it's not like this little bit of info allows for things that were not possible without it, you very much can just add a setting node after running the function every time if that makes more sense to you, but it has more chance of a mistake slipping in somewhere and it will likely make a bit less sense to other people if they have to look at or work with your code.
@carlosrivadulla8903
@carlosrivadulla8903 6 ай бұрын
If checking "pass by ref" modifies the original variable without setting it back or returning it from the function. What the node "set float(double-precission)(by ref)" is for?.
@thegamedevcave
@thegamedevcave 6 ай бұрын
It sets the value? You still need to set values the + node by itself doesnt execute anything. As shown in the video, you need to pass in a ref and then set it. If you try to set with that node without pass by ref, it sets the value of the local copy, not the original value that you put in
@ИгорьАлексеевич-м5м
@ИгорьАлексеевич-м5м 3 ай бұрын
Ну это уж совсем для чайников
Unreal Camera Manager EXPLAINED
10:55
The Game Dev Cave
Рет қаралды 4,2 М.
I Struggled With Blueprint Interfaces for Years!! (Unreal Engine 5)
16:48
Glass Hand Studios
Рет қаралды 184 М.
Electric Flying Bird with Hanging Wire Automatic for Ceiling Parrot
00:15
小丑妹妹插队被妈妈教训!#小丑#路飞#家庭#搞笑
00:12
家庭搞笑日记
Рет қаралды 36 МЛН
Comparison of the Most Painful Punishments
15:42
ECHOES
Рет қаралды 1,8 МЛН
The Most Valuable File Format You've Never Heard Of
15:33
Acerola
Рет қаралды 415 М.
Unreal Engine Optimization: Hard and Soft References
6:00
Unreal Dystopia
Рет қаралды 4,6 М.
Switching Objects in Unreal Engine 5 Using Blueprints
9:44
Unreal ART With Alireza
Рет қаралды 22 М.
Unreal Clicking On Actors
6:34
The Game Dev Cave
Рет қаралды 323
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 714 М.
The Most Common Mistake Beginners Make in Unreal Engine | UE5
12:17
Ali Elzoheiry
Рет қаралды 113 М.
Unreal in 100 Seconds
2:52
Fireship
Рет қаралды 893 М.