Using Blueprint Interfaces In UE4 (Send Data Between Blueprints, Without Casting)

Поделиться
HTML-код
  • Опубликовано: 1 авг 2024
  • Updated Discord invitation: / discord #UnrealEngine #Blueprints #Interface
    ► Description
    In this video, I show how we can use Blueprint Interfaces to send information between multiple blueprints instead of casting to make your project better.
    If you're new to VR and want to get started with Oculus Quest development, I recommend watching these videos first.
    1. Installing UE4 from Source code (contains more up to date Quest features)
    • Installing UE4 4.25 fr...
    2. Installing Android Studio (Required to create Oculus Quest projects in UE4.25+)
    • Installing Android Stu...
    3. My Oculus Quest 1 Settings (These are different to the Quest 2)
    • My Oculus Quest 4.25 B...
    4. My Oculus Quest 2 Settings
    • Quest 2 Settings You S...
    -----------------------------------------------------------------------------------------------------------
    ► Join the Discord: / discord
    ► Patreon: / gamedevxr
    ► Twitter: / gamedevxr
    ► Instagram: / gamedevxr
    -----------------------------------------------------------------------------------------------------------
    PC SPECS:
    ► GTX 2070 Super
    ► I9-9900K
    ► 32GB Ram
    Equipment
    ► Keyboard : HyperX Alloy Origins
    ► Mouse : Anker® Ergonomic Optical USB Wired Vertical Mouse
    ► Mic : Trust GXT 232
    ► Web Cam :
    ► Screen : AOC I2367fh 23-inch LED
    ► Headset 1 : Oculus Quest 128gb
    ► Headset 2 : Oculus Rift + Motion Controllers
    ► Headset 2 : Oculus Quest 2
    ► Graphics Tablet : Wacom Cintiq 13hd
  • ИгрыИгры

Комментарии • 20

  • @refrizor
    @refrizor Год назад

    Your for loop saved me, I have no idea why I didn't think of it, I think instancing just got a little confusing. Thanks so much for the tutorial!

  • @fristenderrules855
    @fristenderrules855 2 года назад +1

    Was having problems with casting in an animation blueprint and watched this. Saved my life.

  • @furkannarin2844
    @furkannarin2844 Год назад

    You are still casting :). When you select an actor from the scene, the engine will keep a hard ref to it so that it will be accessible immediately when you use it elsewhere. With that, even if you look like you wont cast, you still get the overhead of cascading load effect which results from casting and which is inescapable I guess. Thanks for the video though.

  • @arresteddigital1194
    @arresteddigital1194 2 года назад +4

    I was figuratively tearing my hair out trying to figure out how to get a light switch to talk to a ceiling lamp. THANKS.

    • @GDXR
      @GDXR  2 года назад

      Glad I could help!

  • @GregkotGaming
    @GregkotGaming 3 года назад +6

    I love blueprint interfaces. I use them to communicate everything from dealing damage to rewarding xp back to the correct character.

    • @GDXR
      @GDXR  3 года назад +3

      There amazing to use. I use them to fade out my players camera from using diffrent actors, creating universal button, activating held objects in VR. Basically use them for everything.

  • @lz4090
    @lz4090 3 года назад

    Thank you. I now understand better the BP interfaces. Hoping to see more interactive puzzle stuff tutorial.

  • @littlenickjr
    @littlenickjr 3 года назад

    Excited to check this out. Tried briefly learning interfaces years ago, gave up, and have used casting and references ever since.

    • @GDXR
      @GDXR  3 года назад +1

      These are 1000x times better than casting. If your not sure about something and want some help, don't be afraid to hop on over to the discord channel.
      discord.gg/xw65fg7

    • @littlenickjr
      @littlenickjr 3 года назад

      @@GDXR already a member of the discord :) thank you for the invite. I'll test them out and maybe replace the current method. Been working on optimization, maybe that'll have an impact.

  • @ArtofBen
    @ArtofBen 2 года назад +1

    Technically it's still casting under the hood. When you implement an interface you derive from it. When you check if an actor implements an interface, you just cast it to the interface and if it implements it aka derives from it, the result will be true.

  • @EthanFilms
    @EthanFilms 3 года назад +2

    great great video....thank you!

    • @GDXR
      @GDXR  3 года назад

      Your very welcome.

  • @ahmadnaweedrustami7354
    @ahmadnaweedrustami7354 3 месяца назад

    2 things; one, how do you ref an object that hasen't been spawned yet? because you go an pick an object or an actor which is already placed in the scene. what if the object spawns later in the scene such as projectiles fired from an enemy character. and second, how do you transfer data between 2 blueprints which is randomly changing ? for example distance between 2 enemy characters.

    • @GDXR
      @GDXR  2 месяца назад

      Great questions, It might be easier for me to do a video tutorial covering your questions. But basically, you would have the projectiles on begin play get the object that needs them and then add them to an array inside. 2. blueprints don't randomly change, but it's the same as above, you need to make them set a reference somewhere of them selves.

  • @nospimi99
    @nospimi99 Год назад +1

    So when you create a function in a blueprint Interface (that doesn't have an input or an output), it more or less becomes a custom event that can be placed in any Blueprint that has the Interface added under the class settings, correct? So you place the "messenger" version of the function, connect a target of some sort to that messenger function, and the engine looks at that connected target's blueprint to see if the "custom event" you made for the interface it is present, and then fires it. Is that correct?

    • @GDXR
      @GDXR  Год назад

      Exectly. As long as the message to the event has a pointer/refrence to the blueprint then if the event exhists it will fire.

    • @thelawgameplaywithcommenta2654
      @thelawgameplaywithcommenta2654 Год назад

      @@GDXR I'm assuming when you reference those cubes in the blueprint the actor variables isn't holding those in memory right? Otherwise you still have a hard ref to the actor which is what I imagine you want to avoid with casting.

    • @thelawgameplaywithcommenta2654
      @thelawgameplaywithcommenta2654 Год назад

      Maybe it's more direct so better for children?