How to Cast in Unreal Engine 5

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ธ.ค. 2024

ความคิดเห็น • 132

  • @12XFactor
    @12XFactor 10 หลายเดือนก่อน +10

    I spent two days on researching about how casting in Unreal works and this is by far the only video who explains it on a holistic approach. German excellence. :) Thank you for the video.

  • @XxKherxX
    @XxKherxX 2 ปีที่แล้ว +69

    This tutorial totally made me understand such a crucial element of the Blueprints in Unreal -- Thank you!

  • @MrShak0r
    @MrShak0r 2 ปีที่แล้ว +6

    Es ist wirklich beeindruckend wie gefühlt ganz TH-cam bislang daran scheiterte das mal sinnvoll zu erklären und man es unnötig schmerzhaft selbst lernen musste. Danke für das Video^^

    • @NilsGallist
      @NilsGallist  2 ปีที่แล้ว +1

      Ich versteh's halt auch nicht, warum jeder denkt ein "Cast To Third Person Character" wird schon genügen... Hatte auch den gleichen Frust mit Blueprint Interfaces. Hab dazu jetzt auch ein Video oben, falls du da mal Probleme haben solltest. Cheers!

  • @mimic-dev
    @mimic-dev ปีที่แล้ว +18

    This was the most clear explanation of Casting Ive seen. Thank you! I finally get it :D

  • @VaSoLiNexSwAg
    @VaSoLiNexSwAg 4 หลายเดือนก่อน +1

    Finally someone who understands the frustration of opening an Unreal tutorial on TH-cam and the first 5 minutes is all about whiskers

  • @DarryllynnSmith
    @DarryllynnSmith 9 หลายเดือนก่อน

    Underrated tutorial I recommend this to anyone trying to learn about Unreal Engine! Thank you for this.

  • @martyr4861
    @martyr4861 ปีที่แล้ว +27

    But you forgot to mention that you had to Pick the specific Jboy Actor inside the editor, or am i wrong?
    I mean, if you just create the actor reference variable inside of the blueprint, the cast still wont know which exact blueprint you're talking about. You can see in the details panel what I am trying to say - at 3:35 after selecting your BP_JBoy, under "Default", there is the dropdown menu for your public actor reference variable and you had to put in "BP_Jboy2", or else it would say "none" and the cast would fail.
    Just trying to understand, here - im not criticising

    • @petarpehchevski3d338
      @petarpehchevski3d338 ปีที่แล้ว +3

      Yeah I agree. As a beginner trying to figure out what my problem was, that part was confusing to me. I'm not sure why he skipped over that part.

    • @martyr4861
      @martyr4861 ปีที่แล้ว

      @@petarpehchevski3d338 well probably just a mistake while editing or something

    • @corpsef
      @corpsef ปีที่แล้ว +1

      thanks for pointing this out

    • @RMC_
      @RMC_ ปีที่แล้ว +4

      hmm so how am I meant to create the variable then? I'm still confused

    • @martyr4861
      @martyr4861 ปีที่แล้ว +3

      ​@@RMC_yeah, dont worry - blueprint communication IS really confusing in fact.
      If you're trying to do replicate this tutorial, just know, that he forgot to show one step. He needs to set those variables that he exposed, inside the viewport.
      If you're trying to get a grip of BP Communication in general, heres a tip; it really helped me to watch those learning streams vom Unreal Engine by Zach Parrish. Search for the Topic "Blueprint Communication" and also try to understand "Blueprint Hierarchy", that helped me a lot as well

  • @SolidHns
    @SolidHns 2 ปีที่แล้ว +3

    You’re a life saver. Been struggling with this for years. Sub

  • @kiriljakimov4016
    @kiriljakimov4016 ปีที่แล้ว

    Just a genuine thank YOU!!!! in 5m I learn more than in the past month....

  • @vancityr6485
    @vancityr6485 6 หลายเดือนก่อน +3

    I still get a cast failed :( trying to cast to a BP containing a static mesh.

  • @nicocoregames
    @nicocoregames ปีที่แล้ว

    thanks for this videooooo dude you helped me a lot

  • @PekoXXL
    @PekoXXL 3 หลายเดือนก่อน

    I understand now. Thank you! For anyone who still got stuck, make sure to use the picker tool on the variable and pick the blueprint that youre casting to.

  • @treizexinclaire8258
    @treizexinclaire8258 5 หลายเดือนก่อน

    Man thank you! Someone finally answered my question in a way that is more complete. most of the video about casting is just to cast the player character to object without out explaining it

  • @ZorrroUK
    @ZorrroUK 4 หลายเดือนก่อน

    Thank you for this, the concept now makes sense

  • @finlaywatson9319
    @finlaywatson9319 ปีที่แล้ว +1

    I was looking for hours you are a blessing tysm

  • @AndyU96
    @AndyU96 3 หลายเดือนก่อน

    The best way to explain something is to voice the frustration and the confusion that is expected for that thing to cause :)

  • @BerahtHrod
    @BerahtHrod ปีที่แล้ว +1

    Finally someone who can help, especially with the object matter. :)

  • @autumnsai
    @autumnsai ปีที่แล้ว +1

    oh my god you're both hillarious and awesome with that charts

  • @S0KL0
    @S0KL0 ปีที่แล้ว

    THANK YOU SO MUCH I COULD NOT HAVE FIGURED IT OUT WITHOUT YOU

  • @clebo99
    @clebo99 ปีที่แล้ว +1

    Still didn’t work for me. Not sure what I’m doing wrong. I keep getting cast failed. I have it spawning but still didn’t work. Very frustrating.

  • @ThatTechGuy123
    @ThatTechGuy123 ปีที่แล้ว +1

    this was so short but so helpful. i understand calling objects so much more now

  • @gamerknott8791
    @gamerknott8791 10 หลายเดือนก่อน

    I've been struggling with this for so long, thanks a lot!

  • @oasane
    @oasane 10 หลายเดือนก่อน

    This was most helpful about the case, thank you.

  • @BiZkiDD2
    @BiZkiDD2 2 ปีที่แล้ว +1

    You're a great teacher dude!

  • @JoakimMoesgaard
    @JoakimMoesgaard ปีที่แล้ว

    omfg i love your style of teaching

  • @alemolia-d5f
    @alemolia-d5f 10 หลายเดือนก่อน

    Thank you my dude! everyone just cast to 3rd person is insane

  • @AnnisNaeemOfficial
    @AnnisNaeemOfficial ปีที่แล้ว

    you just cleared up months of confusion for me!

  • @jawsomeproductions
    @jawsomeproductions 9 หลายเดือนก่อน

    Man this was so helpful, thank you!

  • @monoreika3804
    @monoreika3804 2 ปีที่แล้ว

    O M G MAN! Thank you A LOT! Thet was THE BEST video on this topic on whole youtube.

  • @gameuniverse2.048
    @gameuniverse2.048 ปีที่แล้ว

    One word. Genius!

  • @kamilabianchi
    @kamilabianchi ปีที่แล้ว

    Perfect Tutorial! Thank you

  • @Dire-Locke
    @Dire-Locke 2 ปีที่แล้ว +1

    Just what I needed thank you! Literally watched 3 videos before yours that all used the cast to character example.

  • @thebugski8215
    @thebugski8215 ปีที่แล้ว

    OMG! FINNALY! Thank you bro. Just thank you. I wish happiness to you and your family. May the Lord keep you. You are the best person on this earth.

  • @halfbakedproductions7887
    @halfbakedproductions7887 3 หลายเดือนก่อน +1

    That stupid Object pin was driving me nuts. Now I know what to plug into it.
    If you cast to Class (i.e. the purple blueprint node) then you're in another world of pain. I still don't understand what that's even for.

  • @Taifun20
    @Taifun20 2 ปีที่แล้ว +1

    Thank you very much, I have been looking for this for a long time

  • @jasonelliott729
    @jasonelliott729 ปีที่แล้ว

    Wow, the object pin was exactly my problem. I'm super new to Unreal and thought it would take forever to find the answer and this was the first video. Thanks!!

    • @swrcPATCH
      @swrcPATCH ปีที่แล้ว

      This is why programming helps. The cast node does not know what to cast to so it needs a instance of an object. Obivously, i mean you have to determine what instance should be casted to what type of class. It is not too crazy tbh. In programming language it is exactly the same.

  • @KDmadness18
    @KDmadness18 4 หลายเดือนก่อน

    Help!! Still doesn't work (cast fails) because you set the value of them to the blueprint class without telling us how. At 2:53 you mention you made it editable so then you can edit it in the viewport, but I am doing this in the gamemode class so changing the value in the viewport is not possible. In the details pane it's labeled 'none', and I CANNOT change this value whatsoever. Like how do I connect it in the details pane???

  • @glormond
    @glormond ปีที่แล้ว +1

    Wow, finally someone explained it! And did it perfectly! Thanks :)

  • @xKarmaYT
    @xKarmaYT 2 ปีที่แล้ว +2

    What a way to explain. Amazing video!

  • @aneckdope
    @aneckdope ปีที่แล้ว

    this info was extremely helpful, thank you very much

  • @KazukiP
    @KazukiP ปีที่แล้ว +2

    this is super helpful but im still unsure how to do this with a widget? when exposing the varaiables at 2:50 I can't then edit them in the Outliner/Details window since they're not in the scene :(

    • @totally-a-random-guy
      @totally-a-random-guy 5 หลายเดือนก่อน

      did you find a way to do it with a widget?

  • @MonsterJuiced
    @MonsterJuiced 2 ปีที่แล้ว +1

    Yes! This is perfect great work. I had so much trouble with this too and you're right everyone just says get third person character. What a cop out, they never explained why. I bet even they didn't know tbh

  • @SantaAna4
    @SantaAna4 ปีที่แล้ว +1

    I try with the type "character " but it doesn't work :(

  • @derf0007
    @derf0007 ปีที่แล้ว

    Thank you! I was stuck for like 3 hours!

  • @McRawrzee
    @McRawrzee 8 หลายเดือนก่อน

    Ur a hero

  • @dmitrykolganov2142
    @dmitrykolganov2142 หลายเดือนก่อน +1

    Nice video about whiskers bro). Try to make one about casting.😅

  • @FFTVYoutube
    @FFTVYoutube 4 หลายเดือนก่อน

    I actually found out if you only have one thing with that name you can just connect the node to itself 😅 connect the as 'whatever' to the object pin✌️

  • @JesterLegend4life
    @JesterLegend4life ปีที่แล้ว

    Thank you so much. Life saver 🙌

  • @dreamwalking2132
    @dreamwalking2132 10 หลายเดือนก่อน

    You save my life!

  • @nome.archvis
    @nome.archvis ปีที่แล้ว

    Need more tutorials presented this way. Thank you !

  • @gourabsutradhar29
    @gourabsutradhar29 2 ปีที่แล้ว

    Thank you so much for this video ❤️❤️

  • @giannisigona5830
    @giannisigona5830 ปีที่แล้ว +1

    hi this is great but it doesn't work for me please help

  • @aleksboboychev
    @aleksboboychev 3 หลายเดือนก่อน

    Thank you!

  • @dwiyantorissetyono7345
    @dwiyantorissetyono7345 ปีที่แล้ว

    wow thank you. can you show us example with using animation blueprint in an actor blueprint?

  • @codyvandal2860
    @codyvandal2860 ปีที่แล้ว

    Amazing

  • @giovanniguidoni3521
    @giovanniguidoni3521 11 หลายเดือนก่อน

    THANK YOU!!!!

  • @malindurashmika8386
    @malindurashmika8386 ปีที่แล้ว

    Greate explain dude

  • @3Dlewis
    @3Dlewis 23 วันที่ผ่านมา

    i am trying to get a health variable from an actor so I can make a heath bar above to AI I needed to cast to my Actor So I could get the variable but after using an object reference it lets me get the variable but doesn't show the percentage correct. can anyone please help me.

  • @TwiejkVR
    @TwiejkVR 2 ปีที่แล้ว

    LMAAAAAAAAO, you named the exact reason why i ended up here. I KNOW I CAN CAST TO A THIRD PERSON CHARACTER! haha but not im staring at the blank void ripping slowly into the heart of my existence called "object"

  • @AustinOConnellVideos
    @AustinOConnellVideos ปีที่แล้ว

    thank you so much

  • @arkalexx
    @arkalexx ปีที่แล้ว

    Goob very good example

  • @112colonel
    @112colonel ปีที่แล้ว

    thank you,thank you,thank you

  • @noname2031-w5r
    @noname2031-w5r 2 ปีที่แล้ว

    yeah nice job dude!

  • @sweetdeal8951
    @sweetdeal8951 ปีที่แล้ว

    Hey! Auch wenn das Video schon etwas älter ist:
    Wenn ich eine Funktion habe, die z.B. ein ItemSet benötigt, kann ich dann auch einfach nur eine Variable erstellen, die den Typ des ItemSets hat? Ohne dafür eine Referenz zu benötigen?
    Also angenommen:
    EquipItemSet ist eine Funktion und als Input benötigt sie das ItemSet.
    ItemSet ist eine File, die bassierend auf einer C++ Klasse erstellt wurde (ItemSet)
    z.B. Test_ItemSet.uasset (ist ein ItemSet)
    Würde ich dann einfach eine Variable erstellen, die: Test_ItemSet.uasset als Variable Type hat?
    Oder muss ich noch eine Objektreferenz dafür erstellen? (Irgendwie über die Asset Registry oder so)
    Weil die Variable an sich, ist ja "leer"?

  • @susem173
    @susem173 8 หลายเดือนก่อน

    thanks man

  • @Wyslijfotkekompa
    @Wyslijfotkekompa 7 หลายเดือนก่อน

    What about spawned objects?

  • @gabrielzanoni9961
    @gabrielzanoni9961 ปีที่แล้ว

    Thankk you very much dude

  • @حاتمإسماعيل-ب7ر
    @حاتمإسماعيل-ب7ر ปีที่แล้ว

    how to give a tag on objects?

  • @chrisbee1984
    @chrisbee1984 ปีที่แล้ว

    Thanks

  • @konspiracni_teorie_official
    @konspiracni_teorie_official ปีที่แล้ว

    OMG BEST TUTORIAL EVER MADE FOR IDIOTS LIKE ME, FINALLY UNDERSTAND :D THANK YOU SUBS AND LIKED

  • @Alksbbch
    @Alksbbch ปีที่แล้ว

    fixed may problem this video

  • @Nocternal774
    @Nocternal774 ปีที่แล้ว

    Thank you SO much T_T

  • @cursedbishstudio
    @cursedbishstudio 2 ปีที่แล้ว

    LEGEND..!

  • @danrocker3855
    @danrocker3855 ปีที่แล้ว

    Cast on Level blueprint fail to me

  • @unrealcıadam
    @unrealcıadam 7 หลายเดือนก่อน

    is it work on 5.4?

  • @sammypolaroid7225
    @sammypolaroid7225 ปีที่แล้ว

    Would this be a way to Combine two gamemodes?

  • @bh8661
    @bh8661 2 ปีที่แล้ว

    Excellent video really helps understanding the fundamentals...I am still stuck though I'm trying to reference a widget BP inside of a component BP but I cant find an object that works, "UserWidget" object doesnt work?

    • @WeirdOne19142
      @WeirdOne19142 2 ปีที่แล้ว +2

      When you create the widget, save the reference as a variable - for instance creat the widget in the game mode and then promote it to a variable. Then get the game mode. Then cast to the game mode. Then access the widget variable.

    • @IoSkyBoyoI
      @IoSkyBoyoI 2 ปีที่แล้ว

      @@WeirdOne19142 What if you dont have a game mode?

    • @WeirdOne19142
      @WeirdOne19142 2 ปีที่แล้ว

      @@IoSkyBoyoI you have to have a game mode. If you don't make one, unreal gives you a default one.

    • @bushmaori
      @bushmaori 8 หลายเดือนก่อน

      @@WeirdOne19142 A year later but thanks for your comment dude, you helped me a lot

  • @patrickmiller1723
    @patrickmiller1723 2 ปีที่แล้ว

    So I’m made ammo current ammo and a box that’s attached to a blueprint but when I cast the box to my rifle nothing happens I hope this is helpful but if your open to helping let me know

  • @THISISMYHANDLETODAY
    @THISISMYHANDLETODAY ปีที่แล้ว +1

    Tutorial is not complete. Per usual. Just read the comments....

  • @jonesy_b
    @jonesy_b 2 ปีที่แล้ว

    thanks, i understand now but now my cast still just fails, im trying to read a value from a child bp but casting to the parent and doin this trick fails the cast

    • @WeirdOne19142
      @WeirdOne19142 2 ปีที่แล้ว +1

      If you cast to the parent object, the cast will be successful, but the reference cast will not have the child blueprint variables because of the way inheritance works. You have to cast to the child blueprint. You can't get around this.

    • @jonesy_b
      @jonesy_b 2 ปีที่แล้ว

      @@WeirdOne19142 oh fr? the variable is created in the parent tho, its not a child only variable. Its just set in the child bps. Does that still not work? thanks for the respond btw!

  • @Broockle
    @Broockle 2 ปีที่แล้ว

    Almost made it work..... I'm trying to cast to another actor to use a boolean in it.
    The other actor is a trigger zone which I made switch a bool on when walked through. I then want a thing to happen when the player walks through that zone.
    So I cast to the trigger and then have a branch. I then connected from 'As Trigger' from the cast and the condition of the branch with the boolean of the zone. But that gives me an error saying it can't find the bool. So.... I'm at a loss once more 😅

    • @Broockle
      @Broockle 2 ปีที่แล้ว

      @@jobenco5757
      not exactly...
      just made my trigger zone do everything I wanted the actor to do.

    • @Broockle
      @Broockle 2 ปีที่แล้ว +1

      "Get Actor of Class" can work better sometimes.
      Or cast to the Class instead of the Object.

  • @dutchs5
    @dutchs5 ปีที่แล้ว

    Sub'ed🎉

  • @radvinmaaleki2100
    @radvinmaaleki2100 ปีที่แล้ว

    get player character makes another problem and that is multiplayer :( thanks a lot

  • @gamax1376
    @gamax1376 2 ปีที่แล้ว

    Awesome tutorial bro! Thank u so much

  • @shoppingforleaves3162
    @shoppingforleaves3162 2 ปีที่แล้ว +17

    Wow, that didn't help at all. Thanks.

    • @MintyChapstick01
      @MintyChapstick01 10 หลายเดือนก่อน +4

      Welcome to mfs trying to teach unreal

  • @herbertvollhut8949
    @herbertvollhut8949 2 ปีที่แล้ว +1

    super witzig erklärt 🙂 grüße

  • @E36_shayne
    @E36_shayne ปีที่แล้ว

    you son of a bitch this was actually gold right here fuckin cheers!!!!

  • @nikwalz3429
    @nikwalz3429 8 หลายเดือนก่อน

    explanation which even idiots understand. Exactly what i want :-)

  • @MarquaviusDingleton
    @MarquaviusDingleton ปีที่แล้ว

    why is this tutorial called how to cast when in reality you're explaining the object wildcard ?

  • @byLottieVT
    @byLottieVT ปีที่แล้ว

    Genial

  • @Rin-qj7zt
    @Rin-qj7zt 3 หลายเดือนก่อน

    so this just straight up doesn't work wtf.

  • @swrcPATCH
    @swrcPATCH ปีที่แล้ว +1

    Why do you cast for this? Just use getClass, plug in the reference and there you go. For what you did in the video casting is absolutely unecessary. And usually you do have a variable that is at least the parent class of almost all acters you want to cast to. E.g. if you want have a circle, rectangle and a triangle then the parent class of all those 3 is shape so you if you'd do anything with triangle, circle, rectangle you'd cast to shape because shape has all functionality that those 3 have. If the objects have barely any similarites then don't use casting but interfaces instead.
    But what you did is kinda questionable to say the least.
    And this is not only Blueprint related btw, the concept applies for programming languages like C#, Java and even C++ as well. IK C++ has no interfaces but that doesn't mean you can not make them.

  • @endergame8267
    @endergame8267 2 ปีที่แล้ว

    Tbh i got so tired to understand this command. Just use interfaces guys

  • @xa447
    @xa447 ปีที่แล้ว

    2:44 no

  • @dantegamedev
    @dantegamedev ปีที่แล้ว

    2:30

  • @Overdrve-mg3xu
    @Overdrve-mg3xu ปีที่แล้ว

    So close to being a great tutorial, but then you just skip over what to do if the actor doesn't exist before you cast to it.

    • @NilsGallist
      @NilsGallist  ปีที่แล้ว

      Easy: Create it befor casting to it.

  • @mk11-rn4lw
    @mk11-rn4lw ปีที่แล้ว

    does not work

  • @xanderstevenson7428
    @xanderstevenson7428 2 หลายเดือนก่อน

    🙏

  • @bigpaps7696
    @bigpaps7696 5 หลายเดือนก่อน +1

    watched whole vid and still fails

  • @markguilard
    @markguilard 2 ปีที่แล้ว

    interesting to understand this incredible confusing cast to