How To Create An Organised Save System In UE5.1 with structs - UMG/Casting/Dispatchers/Game Instance

Поділитися
Вставка
  • Опубліковано 19 чер 2023
  • Updated Discord invitation: / discord #UnrealEngine #blueprints #unrealengine5
    ► Join the Discord: / discord
    ► Description
    I wanted to create a video doing a deep dive into how you can organize your player variables to easily create a save system using UE5.1, I go over, Structs, Event dispatchers, casting, UMG, and the game instance. There is quite a lot to go through so grab yourself a coffee.
    -----------------------------------------------------------------------------------------------------------
    ► Patreon: / gamedevxr
    ► Twitter: / gamedevxr
    ► Instagram: / gamedevxr
    -----------------------------------------------------------------------------------------------------------
    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...
    -----------------------------------------------------------------------------------------------------------
    PC SPECS:
    ► RTX 2070 Super
    ► I9-9900K
    ► 32GB Ram
    ► 2TB SSD
    Equipment
    ► Keyboard: HyperX Alloy Origins
    ► Mouse: Anker® Ergonomic Optical USB Wired Vertical Mouse
    ► Mic: Trust GXT 232
    ► WebCam: Jelly Comb
    ► Screen: AOC I2367fh 23-inch LED x 2
    ► Headset 1: Oculus Quest 128GB
    ► Headset 2: Oculus Rift + Motion Controllers
    ► Headset 2: Oculus Quest 2
    ► Graphics Tablet: Wacom Cintiq 13hd
  • Ігри

КОМЕНТАРІ • 30

  • @3DWithLairdWT
    @3DWithLairdWT 11 місяців тому +8

    So I love the content, and this is great to be showing. I think a UGameInstanceSubsystem may serve better than the full GI for data, but that's not a big deal.
    Save and Load is an eclectic subject in Unreal and it's awesome that you're making great videos about this!
    The general language around "Cast to..." in most UE tutorials is misleading, and I saw it here as well. So I'd like to try to clarify this
    The "Get Game Instance" node is doing all the heavy lifting of getting the reference to your Game Instance. It's doing the "communication" most people are looking for when they think about the "cast to" node.
    That "Get Game Instance" function basically calls "Get Outer" recursively till it finds the game object that owns everything, then accesses it's saved reference to the game instance and returns that pointer to that output pin you drag off of to put into the "Object" input of the Cast To... node.
    The "Cast to" node itself just checks what type of thing a reference is, "is this thing of this type". No communication is done by that node, it's just a check.
    The origin of the word Cast is like "metal cast into a mold", not cast as in broadcast. "Does this Object fit this mold, aka was it "cast" in this mold when it was made"
    So saying "Cast to your game instance" can sound like the cast node is doing the communication part, when it most certainly is not.
    Put 10 copies of your "BP_Character" into a level, use get all actors of class to get an array of all of them, and then you can plug any single one of the results in that array into a "Cast To BP_Character" will succeed. This is because they are all "cast" from the BP_Character blueprint
    I know that might be a lot of wording, and I again hope that the overall quality of the content is not in any doubt. This particular subject is just a very murky one for many, and I even have Jr. devs applying to the studio I work at that don't understand how cast works in Unreal. (In C++ or otherwise it's more of a conversion/interpretation, rather than a check)
    Thanks again for taking the time to make this content!

    • @deeppixelstudio
      @deeppixelstudio 7 місяців тому

      Thanks for taking the time to clarify this!

    • @ryanjdevlin87
      @ryanjdevlin87 5 місяців тому

      I watched a video where a guy said it took him 2 years of unreal to understand this and interfaces lol

  • @cemeterygate
    @cemeterygate 6 місяців тому +1

    This is the only channel with saving and loading I've found that wasn't the copy pasted basic save/load function that every other channel has done. Thank you for going over all this information, what you were doing, and most importantly, why you were doing it.

    • @GDXR
      @GDXR  6 місяців тому

      Your very welcome. Im glad i could help.

  • @ga_s6
    @ga_s6 3 місяці тому

    congrats for the class! Helped me a lot!

  • @deeppixelstudio
    @deeppixelstudio 7 місяців тому

    Fantastic explanation, very easy to follow and the repeated breakdown as you go really keeps underpinning my understanding. I'd love to see a similar video from you talking about multiplayer and what to code where. e.g. game state, player state, game instance... replication can be an unnecessarily complex issue but coding everything in the right place from the beginning can be a real levelling up moment for many devs!

  • @Letrasdesordenadas
    @Letrasdesordenadas 7 місяців тому

    You are an excellent teacher!
    Thanks for sharing

  • @user-wj4se2ls9g
    @user-wj4se2ls9g 11 місяців тому

    Awesome video! This channel is so helpful. You are able to teach and explain concepts and processes in such an easy and digestible way. Great work!

  • @sum_rains7899
    @sum_rains7899 4 місяці тому

    Great tutorial, It defintely has helped me understand structures a little better. Looking forward to seeing more content from you in the future.

  • @arielw177
    @arielw177 10 місяців тому

    Its amazing!!!! Its working great, thanks dude!!!

  • @pHaace
    @pHaace 8 місяців тому

    this was exactly the kinda intermediate tutorial for saving and loading i needed to progress a project so appreciate the video!

    • @pHaace
      @pHaace 8 місяців тому

      i honestly kinda hate this isnt the first thing people that do long 30+ long video playlist tutorials dont start with cause itd make iteration for people that understand the basics already to do more then pause alot trying to do exactly as the video does so everything works. As i am doing now so i know how this is all working in a clean project.

    • @pHaace
      @pHaace 8 місяців тому

      So I am curious cause it seems when closing the game it wont reload player info, how would that be fixed?

    • @GDXR
      @GDXR  8 місяців тому +1

      if your using the game instance there is a node called event init which stands for Initilize. you could use that so as soon as the game starts you load the save data and populate it out.

    • @pHaace
      @pHaace 8 місяців тому

      @@GDXR I was trying to get it to work but was at the end of a long session so I must have been forgetting to call a function

  • @AndreaFromTokyo
    @AndreaFromTokyo 11 місяців тому

    Hey man, nice vid as always!
    Just a curiousity: can't you just save the whole character with all it's variables as a variable directly in the save game? Same for all the other actors?

  • @ExopackVFX
    @ExopackVFX Місяць тому

    Awesome tutorial! I appreciate you not going at lightning speed like in most other tutorials so i didn't have to play it half speed lol!
    With that said, I'm not quite sure where i went wrong with this, but i just can't seem to save anything. I don't think my third-person setup has anything to do with it, so maybe my version? I'm on 5.3 and i:m getting no errors. A save file is generated as it should, but no data is updated upon restarting my game. I do have a hefty number of variables in my struct though, about 60, but it really shouldn't be a factor as so far I've only been testing with the name variable. Any advice?

    • @ExopackVFX
      @ExopackVFX Місяць тому

      Actually my initial assessment was incorrect.. data is saved but I'm having trouble loading it. It appears to be a similar issue to marie-pierneault1035, as it seems that i have to click twice on load to get the data to show.

  • @lukesfilmltd
    @lukesfilmltd 4 місяці тому

    so first of all this is awesome, been setting up a player lives system using it and it works well in game HOWEVER when I EXIT the game ( either PIE or Packaged) and open it back up again everything reverts to defaults... how do you save the actual game instance to save the variables in the structure? been going in circles!!!

    • @lukesfilmltd
      @lukesfilmltd 3 місяці тому

      Still driving me crazy been trying loads of methods to no avail

  • @evgenychernitsyn2742
    @evgenychernitsyn2742 5 місяців тому

    will it work on packaged project?

  • @chadchristopher9761
    @chadchristopher9761 4 місяці тому

    I'm new to UE5 so I'm not sure I followed when you mentioned you should use a border as opposed to a canvas panel. What are the differences and how would it be better?

    • @GDXR
      @GDXR  4 місяці тому +1

      canvas pannel updates with the dveices frame rate making it extremely expensive to calculate. So using a boarder allows it to update only when changes are made. Being more cost effective.

  • @marie-pierneault1035
    @marie-pierneault1035 4 місяці тому

    My dispatcher seems to work as my print name is updating but somehow I have to press the load button twice in order to make it work....any idea what could cause that?

    • @GDXR
      @GDXR  4 місяці тому

      Dispatchers need to be initialised. So your first press is activating it and the second press is actually listening for it. Fire it from begin play or another line of code which runs before hand and it should be ok.

  • @MasonHolly
    @MasonHolly 11 місяців тому

    First! Also, you can't read any of the text because the screen resolution is too low(360p).

    • @GDXR
      @GDXR  11 місяців тому +1

      First! You need to wait for UA-cam to sort out the 4k version. Just give it a minute.

    • @snowsteward8340
      @snowsteward8340 6 місяців тому

      First! you need to upgrade your internet lol before ever talking about a video resolution.

    • @MasonHolly
      @MasonHolly 6 місяців тому

      ​@@snowsteward8340my internet is 4k smooth, the video wasn't processed so the only resolution there was for video.