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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

3D widget does not work with inventory

I wanted to create a 3D inventory that could be used with a vr experience so i looked to the Inventory UI with UMG in the learn tab of unreal. unfortunately when I add the inventory to a 3D widget in a blueprint actor it stops working. Is there a way to fix this or is it just not possible to have a 3D inventory?alt text

Product Version: UE 4.20
broken-inv.png (298.1 kB)
more ▼

asked Aug 01 '18 at 06:25 PM in Using UE4

avatar image

13 2 6

avatar image Nebula Games Inc Aug 01 '18 at 08:05 PM

What do you mean it is broken? You can't just add a widget to an actor in the world and expect it to work like it would with a widget in the viewport. How do you reference the widget? When it is a component of an actor in the world you need to go through a process to access the actual widget. Drag out the widget component --> get user widget object --> cast to "your widget class" --> save output as a reference. Then you can begin to modify the variables within it.

avatar image DarkFearHunter Aug 02 '18 at 04:34 AM

ok, so I am trying what you suggested but i am not sure what you mean to save output as a reference. I have this so where would I go from here in order to get the 3D UI to display the same as the on screen UI? thank you for the help it is very appreciated.alt text

widget-actor-bp.png (124.6 kB)
avatar image Nebula Games Inc Aug 02 '18 at 04:51 AM

First, never use tick for something like this. Use event begin play. Second right click on the output pin of the cast node and promote to variable. Now you have a "reference" which can be pulled out in other blueprints with a "get".

avatar image DarkFearHunter Aug 02 '18 at 05:20 AM

I changed it to event begin play, added the reference and called it Game HUD. Am I now supposed to use the "get Game HUD" in the widget blueprint that has the inventory in it so it will match the on screen one and if so i'm not sure how i would go about doing this.

avatar image Nebula Games Inc Aug 02 '18 at 05:48 AM

You could do it from any blueprint. What you need to do is cast to the actor BP that has the widget as a component. Then drag off the output pin of the cast and say "get Game HUD" this will return the variable that is a reference to the actual game HUD widget. Then you can modify the widget as you see fit just like you do for the viewpoint widget. Call functions, set variables, set image brush and icon etc.

avatar image DarkFearHunter Aug 04 '18 at 02:59 AM

I have been trying to figure this out and i'm still just stuck. Would it make sense to do this in the actual widget blueprint starting with the event construct to the cast? and what would I use as the object to make the cast work? alt text

ui-3d.png (147.1 kB)
avatar image Nebula Games Inc Aug 04 '18 at 03:07 AM

So what I am trying to figure out is how you got the first inventory to work. If the first inventory works, you basically just need to re-wire it so that instead of "updating" the UMG viewport widget, it updates the UMG widget on an actor. Do you have screen shots of your functioning widget? I think it might be easier to modify from that.

avatar image DarkFearHunter Aug 04 '18 at 03:09 AM

I'm literally just using the inventory UI with UMG project that I found in learn tab when you open epic games and are in the unreal engine tab. if you were to download that it would be exactly what i'm working with.

avatar image Nebula Games Inc Aug 04 '18 at 04:01 AM

Ok, relax haha I will download and figure this out for you.

avatar image itsme Feb 10 '19 at 09:26 PM

Hi Nebula,

had the same problem as the thread starter and your solution worked great!

Big big thank you!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

It works fine, it is just a pain in the a** to re-purpose for what you want. It is setup as a viewport widget, you can't just drop it down on any actor. As I said before this is something you will have to "modify" to work on an actor in the world. I just did a quick run through with this. I duplicated the original widget, added it to an Actor and then re-wire all the stuff I could find to use my new widget which needs to be referenced the way I mentioned in my first post which is different from the widget being referenced in the viewport. And now it works, I didn't go into the "action menu" stuff because it is seriously just about finding all the references to the viewport widget and creating the new reference to the actor widget. Here is a screen shot that show you it does work. alt text

3d-widget.jpg (200.5 kB)
more ▼

answered Aug 04 '18 at 04:37 AM

avatar image

Nebula Games Inc
5.4k 28 9 14

avatar image DarkFearHunter Aug 04 '18 at 06:45 AM

So if i'm understanding this correct i need to take thisalt text

and change every reference of this with this?alt text

or am i missing something?

actor.png (144.2 kB)
changeactor.png (256.0 kB)
avatar image Nebula Games Inc Aug 04 '18 at 09:25 AM

Correct! And you might have to grab new nodes for whatever is inside that widget although they should all have the same name. Mine weren't connecting to the old ones like "inventory" (the actual inventory array variable within the widget). But yes, now you got the idea!

avatar image DarkFearHunter Aug 04 '18 at 05:03 PM

I've switched every reference i could find to my "UI", but i'm still missing something. was I supposed to switch the cast to mycharacter to cast to the actorBP or am i supposed to switch something else that i missed?alt text

alt text

alt text

switch3.png (163.6 kB)
switch2.png (277.6 kB)
switch1.png (395.4 kB)
avatar image Nebula Games Inc Aug 04 '18 at 10:08 PM

All you did was rename a variable there. You didn't REPLACE the references with your new widget actor. When I said you need to "rewire" and it was a pain in the a** I meant it haha You are taking a viewport widget and an entire inventory system set-up to utilize a viewport widget and you want to stick it onto an Actor in the world. Which can be done BUT requires you to create a reference to the "world actor" anytime you want to do anything with the inventory and from each blueprint you wish to modify the inventory. Accessing a viewport widget is fairly simply you can get a reference to it from "create widget" and save the output pin. Accessing a level actor isn't that simple. This is usually where overlap events, hit events, event dispatchers and interfaces come into play. I was lazy and used "get all actors of class" to create the reference and went from there. Here are some screen shots of what I mean when I say "reference" and "re-wire" this entire system.

alt text

alt text

alt text

alt text

alt text

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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