Announcement

Collapse
No announcement yet.

static blueprints, instantiations and more questions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    static blueprints, instantiations and more questions

    Hi guys

    I try to understand a few things, hope you can help me out (single player game).

    1) Why do I need to use the "SaveGame" blueprint if I can just create any empty one and call the load / save nodes?

    2) How to access the SaveGame blueprint from another blueprint?

    3) in continue to question 2, how to instantiate (spawn?) SaveGame blueprint from the GameInstane blueprint so I can keep a reference to it ?

    4) How to make a blueprint static/global so I can call it from anywhere?

    In unity I had one object unfold the entire game structure on play, and references wise it worked great while some stuff was static due to their nature. I try to understand how to do the same in unreal, or maybe there are better ways in this engine.

    thank you

    #2
    1. Perhaps I didn't understand your question but the nodes CreateSaveGame LoadGame etc expects a SaveGame derived Object so any regular Object won't work.
    2. You could Create the SaveGame Object in your GameInstance and retrieve it using GetGameInstance and Cast to your GameInstance. You can create a helper functions in a BlueprintFunctionLibrary that could Cast to your GameInstance and return the SaveGame object.
    3. Either Create the SaveGame with the GameInstance Init function or make a Getter function that creates a SaveGame object if it is not set (Null).
    4. GameInstance is the only Blueprint that will always be available unless if you know C++.
    Last edited by GarnerP57; 11-10-2019, 07:24 PM.

    Comment


      #3
      Thank you
      and sorry for late reply I was not home

      1. Thanks now I understand.

      2. thank you. can you please give the technical explanations for how to do this? there is no online explain for how to do this (i could not find).

      3. Hope its ok I'm asking, can you give me a technical explanation about that as well ? . I could not find that in a tutorial. how to spawn a blueprint of type SaveGame within the GameInstance (it doesn't let me, it let me spawn custom blueprints that have 3d geometry in them).

      4. I understand thanks.

      Comment

      Working...
      X