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,
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.
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.
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?
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.