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"

Is Valid and Cast To nodes problem with Widget Blueprints.

Hi and hello :)

First of all if there is a huge difference in using one big Widget BP with lots of hidden and visible widgets instead of few smaller Widget BPs? Few of the widgets can be quite consuming since they are "streaming" the view from cameras. But that's not why I'm here.


And here is the proper question (questions). Basically I have no idea how to use "Cast to" node properly. Very often i'm experiencing error and warnings. Here is what I want to accomplish this time and I think "cast to" can be very handy here... but i need Your help.

I have two Widget Blueprints. First one is called "Desktop", the other one is called "Window".


Here is "Desktop". It creates a fake loading bar (bar is destroyed after filling up to 100%) and the "Window" Widget BP in this specific order after the doubleclicking icon.

alt text

Here is "Window". It contains few widgets like buttons, images etc. alt text

And here is the thing :|

The "Desktop" was able to allow us to create the "Window" Widget BP as many times as You wanted by simply clicking on the icon on and on. So to prevent that i created "Is Valid" node. In my opinion it should work fine. You should be able to create "Window" Widget BP only one at the time. But the problem appeared. It looks like, once You create a widget, it stays in memory forever untill You relaunch the game. So the "Is Valid" was working untill someone wanted to close **"Window"**and open it again.

So I figured out I should use Branch and the Bool Variable.

alt text

And here is the another problem I can't solve, but this time due to my lack of knowledge and experience. What I know is I should somehow pass the information about "Is_Open" Variable from the "Window" to "Desktop" to let it know that the "Window" can be opened again. But I have no idea how to do this properly :(

alt text

At the bottom of this blueprint You can see references to both Widget Blueprints.

And here are the things I need Your help with.

If I wanna keep the "Is Valid" node, i need to know how to remove the "Window" from the memory after removing all of its components. As far as I know there is no way to remove Widget from the memory once it was opened. Maybe I'm wrong.

If I'm not, I need You to help me pass this Bool information from the "Window" to "Desktop" so it can be opened again.

Thank You for Your time in advance ! :)

Product Version: UE 4.11
Tags:
test_1.jpg (441.2 kB)
test_2.jpg (452.3 kB)
test_3.jpg (434.9 kB)
test_4.jpg (467.4 kB)
more ▼

asked May 04 '16 at 10:59 AM in Blueprint Scripting

avatar image

Asterat
1 2 5

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

1 answer: sort voted first

You could Destroy the Widget after you have removed it.

But, I think the better way if your having problems like this is to use the UMG Switcher. Unfortunately there doesn't seem to be any documentation available on the UMG Switcher. There are several AnswerHub questions regarding how to use it. The switcher is made to handle switching between different UMG Widgets.

more ▼

answered May 04 '16 at 04:40 PM

avatar image

mikepurvis
2.5k 101 65 260

(comments are locked)
10|2000 characters needed characters left
Your answer
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