x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

Hello,

My purpose is to kind of to 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? In the test setup I created it in the character class.

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 workflows.

Thank you!

Product Version: UE 4.14
Tags:
more ▼

asked Apr 21 '18 at 04:12 PM in Blueprint Scripting

avatar image

Kidox18
1 2 4

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question