Help: Combining a Static Mesh BP and a Widget in to one BP.

Hi

I recently saw a Video that shows how to make a 3D widget. Unreal Engine 4 Tutorial - 3D Widget (UMG 4.6) - YouTube

Now, I would like to add it to a current BP, for example a factory so you can walk up to it and see it’s level, how much money it is making and stuff.

I first thought about making it separately then spawning it when the building is made. But not sure how to reference that “factory” over the other 3 factories for example that are the same BP.

I thought about putting this Widget inside everyone of my BP, but that is going to take forever and may not compensate for terrain level,

How would you go about this?

Regards

Hi!

I think this is help you:

Hi

Thank you for a quick reply. I like Tesla’s Tuts.

So it looks like attaching to each BP.

I tried spawning from BP, but only kept data from first factory :frowning: Different levels have different materials ans size. 3D widget in the back left.

Looks like I got a lot of copy/Paste to do.

Regards

Just thinking out loud here. What if you make a meta static with a 3d widget in it and then inherit other from it? This way each of them can have it’s own BP but they will have a widget as a part of the parent class.

Ok,

1st issue. Never heard of a "Meta Static " sorry.

Any help on that and I could look in to it.

Regards

Sorry my wording wasn’t very technical. What I mean is you can create a base blueprint “Structure”. You add widget logic into it. Then you can inherit your “Factory”, “House”, “Power Plant” blueprints from “Structure” blueprint and have of the functionality of a parent.
This should be accessible since v4:

So you don’t need to copy/paste widget across of your BP’s, just call their parent functions.

Cheers

I will have a squiz. Have not really played with struts yet, so this might be a good opportunity.

Regards

That looks perfect.

Except, Do I create based on from the BP or the 3D Widget?

You mentioned Struts, A little new to Struts.

Let us say for example, as per my previous post I have 2 figures, Money and Level in the Factory BP, how would i handle this and promote between the 2.

If I do this the “create based”, do I remove the original Static mesh in this case and replace with the 3d Widget?

Sorry for the NOOB questions.

Regards

By “Structure” I mean your own custom BP which will be a basis for your more specific BPs. Let’s do another analogy.
Let’s say you have BPs of different cars, you want to have a widget with their level of fuel and health displayed on top of them. So what you can do is make a base BP “Car” (inherit it from what ever you want to use as basis -Actor or Pawn or something else), add widget into it, put some logic of how widget values are updated. Now you can create another BP “Racing Car” by inheriting it from “Car” blueprint and your widget will be already there as a part of the parent.

But If I have this right, I would need in the world, The base BP, my building BP and the Widget BP?

Regards

Hi

I am a little stuck. I can do it up to casting to the Health.

My Widget, the ---- is where I want the Data.

bd3364fa3ace97e89fe1b60804c0360dbfeb7bd1.jpeg

Attached to my BP

17ec767ff375ef94ca5d44ad79d3721ed60e910c.jpeg

Can not do the get after cast as it only allows me to cast to a Progress bar. How would I reference A Text Block.

Any help would be great

Regards