I learned something new, but it did not solve my problem.
@skyblade7438
2 жыл бұрын
I have never seen such a perfect description of coding.
@Symphonio
Жыл бұрын
He went wayyy too fast, showing off way too much that he’s good at what he does but not really explaining
@cecill2520
3 жыл бұрын
thank you:)very helpful
@bodacious705
2 жыл бұрын
good info, but for beginners I think it would help to go a bit slower and reiterate key points. I think the video was pretty good, but just as a tip for beginners like me, explaining the material in several relatable ways helps reinforce what the viewer is learning in their mind and store is there more effectively. Just my thoughts. keep up the good work!
@supjay3945
2 жыл бұрын
Lol yea he goes so fast it seems hes talking to himself.
@Zeriel00
2 жыл бұрын
@@supjay3945 Yea this doesn't help me at all. I've used casting before but I don't know a lot about Widgets. So He's talking about a lot of different things at once when I just want to know what goes in the object pin.
@supjay3945
2 жыл бұрын
@@Zeriel00 try slowing video down, it helps but makes him sound drunk.
@supjay3945
2 жыл бұрын
I forgot I watched this video before and tried to follow the tutorial but he went too fast and flew by the simple steps (closing deleting stuff) that I got lost. Was gonna comment but saw my old comment. Lol
@unreasonablebastards753
2 жыл бұрын
Yeah this is a super confusing way to explain this concept. Weird approach to use widgets.
@schrottiyhd6776
3 жыл бұрын
Best way for Refferences: Cats or A LOT OF CATS
@null6482
3 жыл бұрын
.
@null6482
3 жыл бұрын
.
@stevenkent5351
3 жыл бұрын
Great video, i wish i had this back when i started 3 years ago, because casting was THE HARDEST thing to over come when learning how to use UE4. I might make a suggestion, tell people how expensive casting is and how to minimize the impact by creating references in begin player when heavy usage will be needed.
@dreadtrain2846
2 жыл бұрын
Interfaces ...
@kenalpha3
2 жыл бұрын
Where is a vid that explains the name of this alternative?
@Garycarlyle
3 жыл бұрын
Great video. I love how you are building repport with us by relating to the errors.
@akillus83
3 жыл бұрын
To fast man. Look like you wanna go to restroom)))
@djpelsabu6433
3 жыл бұрын
lmao
@thearchlich7273
2 жыл бұрын
This doesn't explain anything. I am as confused as before watching this video.
@QER4992
3 жыл бұрын
unfortunately, this didnt work for me, Im trying to make it so when I have a suppressor equipped (on my gun) it changes the sound by a boolean whether suppresor is equipped or not and Im getting this from a cast to node but it doesn't work even when I tried to use the cast to class node but I would say this is a great video!
@noname2031-w5r
3 жыл бұрын
dude why even use casting thats the first question.... to be answered. disliked
@guritfakgill8173
2 жыл бұрын
I've been trying to figure this out for the past 2 hours, then i saw this and you saved my life. Thanks man
@Pierraxl
3 жыл бұрын
Didn't helped me at all to understand how to correctly cast.
@Alex_Panagiotidis7
2 жыл бұрын
when i create widget and add parent it doesnt has a object(selection)
@I-Maser
4 жыл бұрын
1:34 Your goddamm right
@yassintamer4571
3 жыл бұрын
yeah 100%
@nathantew7638
Жыл бұрын
This is the first video i've seen that actually explains casting in a understandable way. Great video
@sunnymon1436
2 жыл бұрын
How can an object reference in the construction script of a parent class exist in the world, if the object's creation code (in this case "create widget" is run at "BeginPlay" - surely the parent's construction script is run first, and wouldn't find the object reference because the parent's construction script MUST run before the child's BeginPlay (not finding the object) before the object's code (which runs at begin).?
@Crossfar
Жыл бұрын
this tutorial beats the whole purpose of casting in the first place! I only clicked on it cuz it sounded funny! question is not how to cast! question should be when to cast! obviously casts failing is not a bad thing! its not an error! its literally what casting is for! u cast to make sure certain logic only happens when a specific taken object is valid and of a certain type! and if its not u want to do something else instead ... you never cast just for the sake of casting! cuz that is just stupid to do so! if you know the object will always be of a certain type u can just store it in the certain type container and get rid of the need to cast! or if u need to access certain events , functions or variables inside your object , its cheaper and in long run much safer to use interfaces instead of casting!
@elihall3652
2 жыл бұрын
Bruh but why is this shit so f-… complicated
@Amelia_PC
2 жыл бұрын
That was a great video! I still can't Cast to Chameleon (Post Processing BP from marketplace) class in my Player Blueprint because of that stupid Object reference. Man, how I hate casting...
@3DWithLairdWT
Жыл бұрын
This is good, but leaves out a really important point. "Casting" is literally just a way to compare two things --- when talking about Blueprints in Unreal. Is the *Object Reference* I pass in the same type as the *Cast To **_____* An *Object Reference* points to an address in memory A *Class* is a layout of data in memory So we take that layout, and then compare it to the actual data at the address our reference give us and see if they are the same. "The same" means:: They are both the exact same type/class and therefore you can access data/functions etc from it because you now know how the data is laid out in memory OR the *Object Reference* inherits from (ex. is a Child Class) of the *Cast to **____* --- and therefore you know that the child has at least all of the parent data laid out in memory in the same way and you can safely access the contents. So in closing, it is important to keep in mind that Casting is in no way a form of communication between objects, it is a way of determining how you can interpret an Object Reference
@Nathgamer
Жыл бұрын
I've tried every tutorial on the internet including this one and none of them have worked for me, I just wanted to display the health of each AI in my level, but it would either fail or only show the health of one AI or all of them as a class but wouldn't update for each AI, what ended up working was casting to the widget from each AI on event tick, no idea if this is the correct way of doing it but it's literally the only thing that has worked. For some reason every tutorial has the widget casting to the actor to get an update of its health, no idea why.
@Legend64Project
2 жыл бұрын
Okay why is this so difficult? I can't just make a simple reference to another BP that I want to cast to and hook that into the object reference pin? I can't get the cast to node to work at all.
@Legend64Project
2 жыл бұрын
For those who are also stuck, you can use a "get all actors of class" node and hook it into a "get" node and then connect that into your object reference and it actually works.
@lilotesa
2 жыл бұрын
Dude this is why I think I want to start doing tutorials to help people out with things like this because this is absolutely not how you do it and your video didn’t help me at all I sat here for 5 minutes listening to what you said word by word and did it and it didn’t work not one bit what you simply have to do to cast inside of a UI is plug-in player character and that’s literally it
@fouadelsadany4939
3 жыл бұрын
thanks a lot! , but how to bind events of a button in widget, inside an actor blueprint? like an actor to widget communication.
@jorgecastilleja5356
3 жыл бұрын
Thank you, this is great, This is exactly what I was looking for!
@mathiasmiranda6825
3 жыл бұрын
I have a question, instead of getting the password how about if i want to change the value, like set a boolean variable to false or true. How can i do it with clases? Good video btw, thx mate.
@aaronhunt7204
3 жыл бұрын
A successful cast will return the desired object reference, meaning you can set your boolean value using the "As (Your Class Name)" pin.
@YamamotoGenryusaiShigekuni
3 жыл бұрын
You see the actual confusing question is "Is the 'Parent' widget created after 'cast to me' or vice versa? That part is confusing. The problem is always that inheritance bs. So which one is which? As far as I've understood, you created a subclass and named it "Parent" for some reason and then used cast to me get password stuff from a parent-like (at least I felt that way) widget named "cast to me". So which one is it? I need a plane, simple answer please.
@patrickmiller1723
2 жыл бұрын
I'm making a game with a reloading blue print but I cant connect the ammo to the character the ammo connects to the gun just fine but I cant press the R input it doesnt work in the gun blue print
@lv99redchocobo37
3 жыл бұрын
still confused lol. sigh. :
@NoahThomas29
2 жыл бұрын
Wow do i find it soo funny that you made the password turtle 😂😂😂
@markojotovic8991
2 жыл бұрын
working without error but for example it doesnt work with integer.. the default integer value doesnt not make changes
@zinze00
2 жыл бұрын
So.. How do you cast from an actor, to your character and then send the infomation to a third actor? Cus thats why im here, not for widgets..
@bighit20100
3 жыл бұрын
More confused than before...
@keelei
3 жыл бұрын
Instead of using cast every time in your game, better try to use interfaces and really learn this kind of topic. You will see you will get much more performance out of the box. Casting is very expensive if you deal with big objects and a lot of references.
@WhiteTechWT
3 жыл бұрын
OMG I love you. I have been struggling for 3 days trying to get this to work. You're awesome!
@SenEmChannel
3 жыл бұрын
I will try this tomorrow. Bjt tutorial kind a fast to me.
@IrocZIV
2 жыл бұрын
Had to watch at .25x speed a few times, but good info
@tacticalbacon8064
3 жыл бұрын
awesome but what if i have a Boolean in that class that i wish to change its value from a different BP what then?
@assassinhitman
2 жыл бұрын
I'll never understand casting...just have to do with interfaces
@ThanksIfYourReadIt
2 жыл бұрын
I dont know what cast to is, i dont know why you want to use it and i deffinetly dont know what just happened.
@MonderMurshed
8 ай бұрын
It helped but is that really the only way to get object i feel not!.
@CasperLind1
Жыл бұрын
you explain the problem very well but i don't get why this is the solution
@clebo99
2 жыл бұрын
Can you do one where I’m casting to an NPC to either follow or not follow me?
@WadeWazenegger
2 жыл бұрын
Everyone using turtle as their password just got really worried.
@pacocarrion7869
2 жыл бұрын
Mmmm nice but not clear at all, I think is more complicated than that.
@SoaringSimulator
2 жыл бұрын
JAJAJA Thank you so much ! This video makes me happy!
@lairdkim405
3 жыл бұрын
Finally, I got the answer after weeks of searching... God Bless you man
@FPChris
Жыл бұрын
How to cast to "Get Class Display Name" ?
@OwenPrescott
3 жыл бұрын
I would have avoided so many stressful moments if I knew you could do that 2:50
@RezaJafari1984
3 жыл бұрын
2:38 Tick Expose On Spawn
@becomeplayer1
Жыл бұрын
No error but cast still continuously fails. Bad tutorial
@MichaelBLive
Жыл бұрын
I understand your explanation but I think it's solving a different issue than in the title possibly. Suggestion to help beginners: define Instance and Reference for people that don't know WTF that even is. I've got a situation where Set Object Class isn't recognized in the same scope yet. Wondering if I just need to find another function instead of SetChildActorClass. Like a Create function that I haven't been able to get to work in my case. Cool. Thanks for the info.
@shaolung5342
3 жыл бұрын
4:42 I have been looking for that answer for... ever... LOL Thanks
@costa3951
2 жыл бұрын
I feel like I know less now then when I started watching.
@boldganbaatar7023
2 жыл бұрын
i think its good video. but its not for total beginners!
@UnderfundedScientist
3 жыл бұрын
Seriously amazing stuff, I subscribed. If your willing I'd love some feedback on my project, I have a short clip posted
@Nekro9000
2 жыл бұрын
Doesnt help with casting from actor to actor though
@serped
3 жыл бұрын
Thanks for solving my problem
@MrLunox
Жыл бұрын
sorry this doesnt help a single bit lmao
@gibsonfx3819
3 жыл бұрын
Thank you so much! This was very helpful.
@lunarpooch4398
3 жыл бұрын
honestly this just confuses the shit out of me
@ChaseTheVase
3 жыл бұрын
Dumb beginner question but what if I'm not using widgets? I have a Boolean in one Blueprint that I need to get to another
@kolza4067
3 жыл бұрын
I have the same problem so if u found the solution i would appreciate an explanation
@ChaseTheVase
3 жыл бұрын
@@kolza4067 I found something that works for me. Say you’re in a blueprint named “yellow” and you need to reference a blueprint named “green”. In yellow, make a variable. The variable type (where you would pick Boolean, integer, float, string, etc) literally type in the name of the blueprint you’re referencing. So in my example I would type “green”. Make sure that you check “Instance Editable” in the top right for the new variable. Then I would drag my “yellow” blueprint into my scene. In the details panel of “yellow” I can now drag in my “green” blueprint and then reference anything in “green” from “yellow”. Hope this helps!! If you have a question I’ll do my best to answer.
@kolza4067
3 жыл бұрын
@@ChaseTheVase thanks so much It worked!
@Xoremus72
3 жыл бұрын
So I have an issue where I Want to Cast To BP_CurrentWeapon actor, and get the ammo decrement from a function within to read out on a Text on my UI Widget ? the gun in question spawns on the character when play is hit. Any help would be greatly appreciated.
@leonidkhamadakov7778
3 жыл бұрын
Thank you so much! You fixed my problem. Its sad how you only have 66 subscribers. Here brother, have a sub
@360ambiencevideos
2 жыл бұрын
How might I use a widget in the world in VR and use it to call functions inside my VR pawn? I want a 3d widget visible in front of me when my motion controllers overlap, and I want to use the widget to call functions of my Ai companion using my VR pawn.
@elfincredible9002
3 жыл бұрын
I'm trying to cast a blueprint with mesh to a widget. or the versa....and I'm lost somewhere.
@maz5-870
2 жыл бұрын
Wasnt very clear on what to do
@viktoriaebel2507
2 жыл бұрын
maaan, thank you A LOT!!!! this video is exactly what i was looking for, is a solution for my problem!
@lamboking8able
2 жыл бұрын
I haven't tried it yet but it looks like its what I needed. will edit tomorrow but THANK YOU!!
@ginopiastrellini8900
Жыл бұрын
exelent !! 🙌🙌 I saw a lot of tutorials but this is the best, you won a like and suscriber sr
@mx-gamesdev8287
2 жыл бұрын
For beginers far to fast....
@ReenoMoon
2 жыл бұрын
i am even more confused now
@llYuki0okami
2 жыл бұрын
still not understand a sheet
@adrianmiszczuk8061
3 жыл бұрын
So cast to is really useful when you want call this variable like password in string from other blueprint, in this case Widget and also with custom events
@thejoeyfarah
2 жыл бұрын
you confused me way more
@hottestmanevar
3 жыл бұрын
You're the best
@benjaminhawklyn
3 жыл бұрын
2:32 I was having trouble getting object reference in the widget until I looked it over again and this part i
@honzapecinka3144
Жыл бұрын
thank you!!
@justinrussell2
7 ай бұрын
thanks
@Saas_1
3 жыл бұрын
Thank u a lot!
@jacobmmm8260
3 жыл бұрын
Thank you. Your video will very helpful for me;)
@sh1nyplayer
3 жыл бұрын
Thank You! I was your 160th Subscriber
@clebo99
2 жыл бұрын
Very nice!!!!!
@Othman1992on
3 жыл бұрын
Thank god for youtube's slowdown function
@tacca4720
3 жыл бұрын
Nice video, cheers. Interesting playing with bluerpints (determined not to bail back to C++). Still trying to create an array in one actor, and view array elements in another actor; think I've made it fair more complex than I need to, but hey, blueprints are fun..... right :)
@nicolascasanova4853
2 жыл бұрын
i love you
@Broockle
2 жыл бұрын
uhh... those nodes have a lot of different colors..
@Broockle
2 жыл бұрын
4 months later, same problem again... still don't understand at all 😅 I just end up putting everything I need into the same actor so I have to cast as little as possible.
@Broockle
Жыл бұрын
godammit i'm here again, everytime! Casting is bloody difficult 😆
@jessesolomonscott
2 жыл бұрын
Well Explained thank you so much
@vrai_
3 жыл бұрын
Get all actor of class done
@aaronhunt7204
3 жыл бұрын
Not a great practice! This method is resource heavy. I recommend against it unless absolutely necessary.
@JessicaMarinaRushie
3 жыл бұрын
This is brilliant! This has fixed my problem, thank you!
@milan.980
3 жыл бұрын
hi @Jessica Marina Rushie , I think this helped me also
@alexogar9300
3 жыл бұрын
I just want to say thank you very much! You re awesome! Cant thank you enough
@hosseinnafisinia9151
3 жыл бұрын
Easy, Fast & Pro. THX MAN
@superfluousvii9686
3 жыл бұрын
how do you cast to landscape?
@ruslangolovchenko6797
3 жыл бұрын
Hey! Thanks a lot for the video! And if we work with an actor, where can we get a reference for an object?
@felipefernandes2045
2 жыл бұрын
yes
@musikalniyfanboichik
3 жыл бұрын
damn, this video is a lifesaver. thanks!
@SkSafowan
3 жыл бұрын
Man, you Deserve More Sub !!!
@PsyCoCinematics
3 жыл бұрын
I can follow along with widgets, but I think I'm missing a step when it comes to how this applies to actors. For example, here ya get around the missing reference with Create Widget in the level BP. There's no Create Actor. So... ah?
@aaronhunt7204
3 жыл бұрын
Well, you can always spawn the actor. If the actor is already spawned, you can create a variable inside the parent and set it manually as an instance editable actor reference. 😄
@PsyCoCinematics
3 жыл бұрын
@@aaronhunt7204 I did that but I cannot cast to the actor bp without the error you showed/no error and cast failed, basically 2:26 in your video. Does this method only work on level BP?
@aaronhunt7204
3 жыл бұрын
@@PsyCoCinematics Casting is the same everywhere. What is in your object pin?
@PsyCoCinematics
3 жыл бұрын
@@aaronhunt7204 I plugged the object reference variable which is exposed and editable. Accidentally made one an Actor but changed it to the proper one but still no-go. I *did* manage to get communication in a separate bp, but it isn't ideal. I have a health variable on the 'password' bp to try and edit the health from another bp and make sure I 'got it'. On the Thirdperson BP I setup F key>Cast to ActorWithPassword (with plugged in Object Ref)>Printstring with Password plugged in. Fails. On the Level BP I setup G key>Spawn ActorWithPassword (plugged in player location)>Promote Return Value to Variable>Get Health>Promote Health to Variable>Printstring current Health amount H key> Get health, minus 10, then set Health with a Printstring showing it chop down J key>Cast to ActorWithPassword (plugged in the variable set with G)>ActorWithPassword's Test Function (a Printstring) which succeeds I can take out J's Cast To and only plug in the promoted variable to the function and it will work as long as G was pressed first. But Thirdperson's F key doesn't work at all, before or after ActorWithPassword is spawned or pre-existing in the level. I even tried making the default value the ActorWithPassword and still it can't 'see' it through the Object.
@aaronhunt7204
3 жыл бұрын
@@PsyCoCinematics J works after G because when you pressed G, you validated the casting object variable. When this variable is invalid, that's why your cast results in a failure. In the instance of your ThirdPersonBP, you need to validate this variable. Either by spawning or setting manually, regardless, that variable needs to be an existing reference to the blueprint you're trying to cast to.
@Lothar1812
3 жыл бұрын
I love you
@niranjanwagh5767
3 жыл бұрын
I am very beginner and when I saw what thing you are going to answer, then I got really excited. But when you started creating other stuff I started having more questions than answers like what the hell is world blueprint. I having been watching beginner videos for a month now and nobody told what that is! Then the tutorial got more confusing when you bring up widget and parent. And I got more confused between which one is actually a parent and which one is the parent BP we created earlier. Please keep things beginner friendly if you are going to explain a beginner level topic.
@mobilityrp3888
3 жыл бұрын
This became confusing for me because they changed the way you cast now it doesnt give you the option to select actor class on the left unless you do Get Actor Of Class,
@aaronhunt7204
3 жыл бұрын
Hmm, you shouldn't ever need GetAllActorsOfClass for a simple cast. Are you casting to an object or a class?
@mobilityrp3888
3 жыл бұрын
@@aaronhunt7204 I'm trying to cast to a class called explosion. This class only exists when spawned by the bomb. So I'm not sure what to assign as the object really
Пікірлер: 148