Menu example

I can’t find a working example of how to attach a menu to the viewport since the 4.6 update. Spent the last hour googling. Does anyone have one handy?

Alternately, this is what I have now and nothing shows, no debug message:

://i.imgur/eQv3N5O.png

Any idea what I should be doing?

  1. do you use UMG? :slight_smile:
  2. from where do you want to do it? (actor bp, character bp, level bp,…)
  3. here is how it works with UMG + the level bp:

That screenshot’s out of date, “Add to viewport” has been removed in 4.6: (https://answers.unrealengine/questions/139137/has-remove-from-viewport-been-removed-in-46.html). It looks like it has been replaced with “add child” as in my screenshot above, but I can’t get it working.

I’m not sure what you mean by UMG, I’m just using whatever UI kit comes with the editor.

Screenshot is not out of date. “Add to viewport” works just fine… it’s “Remove from Viewport” that was replaced with “Remove from Parent”.

Also… Official docs: UMG UI Designer. :slight_smile:

It seems like it implies the viewport context related to “remove from viewport” has been taken out along with everything that uses it. I’m on 4.6.1 and “Add to viewport” just doesn’t exist in the context menu.

To check I just opened a blank project (4.6.1) and created a Widget Blueprint… right-clicked the graph and searched and found it. Perhaps you’re trying to drag and create it from the wrong node?

Edit: In the Level BP I’ll only see the node if I de-select ‘context sensitive’, so it probably is about pulling from the right node to get it.

  1. Add to viewport is still exist and working correctly. New “Remove” node allows to remove child objects not only from viewport, but from any widget.
  2. In your example you are casting null to viewport, which does not look like nice idea.
  3. Drag out “Add to viewport” node from just created widget and everything will work correctly

Initially nothing relevant would node out from “Create menu_c widget”. I tried setting it up like the docs again and this time it worked. I guess I just missed something the first time. Thanks guys!