Announcement

Collapse
No announcement yet.

Where to save variables and functions to communicate from a UMG Widget.

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

    Where to save variables and functions to communicate from a UMG Widget.

    Hello,

    My purpose is to kind of create a widget blueprint content that communicates with a character. This widget blueprint should be able to be reused in another UE4 project if nessecary by migrating it's asset, if this works.

    For example I might have a button in a level menu widget that determines wheter text should be displayed in a chosen level when it's opened and sets it to a bool (isButtonPressed).
    My test setup has been to create a SaveGame function (in first person character) which communicates with the (isButtonPressed) and saves its bool to a SaveGame. Then that bool var has been retrieved with a GetSaveGame function in the newly opened level to do whatever like.

    It all seem to work but I am woundering if I am creating the bool variable and function in the "right" class, in terms of making a UMG menu widget reusable in another UE4 project?

    I.e. if I have a new character setup in a new UE4 project/ version and I want my UMG menu widget, created in an earlier project, to be able to communicate with this new character setup, should I then have the bool variable and "SaveGame" function created in player controller class instead of the character in the first place?

    So basically if am getting it right here, to make my UMG widget to work with another UE4 project character, would I have to migrate the UMG UserWidget, SaveGame and PlayerController class?
    If I am totaly off the track here am happy to hear other workflow.


    Thank you!
Working...
X