Please help :( Need Guidance on my UMG changing mesh components project

Have been away from UE4 for quite some time now & am feeling relatively rusty. I am starting a pretty large project in which I want to create an in-game editable Kitchen furniture environment. There are 10 groups of furniture styles I am planning on modeling all with interchangeable doors & handle among other things too. With so many potential possibilities and variables my heads in a little bit of a spin…

Through blueprints each of the units (there will be many types) I create will have the ability to change furniture Styles, doors and handles etc: (through UI popup menus in-game:) I’m planning on using: A UI popup in UMG for each unit BP used via character trace to get target blueprint. I’ve also used exported sockets for the handle & door locations

I’m thinking it would be best for me to use different Blueprints but with similar features for each of my units. Maybe my initial sketch will make things clearer i hope :S3e1488864ee6efeca39495c6d16da93d177ad3f6.jpeg
I just really wanted some foundation feedback on weather I would be using the best initial logic to get this concept going?
Sorry it may be little confusing please ask to to clarify if unclear
How would someone else attempt this project?
Many Thanks,

Bumpity bump bump :slight_smile:

I’m a little bit confused by your question. Are you asking for the best method to create a UI which would need many variations?

If so, for me personally, that would depend on how many furniture objects you plan to add. You could dynamically generate your UI based on a sort of template UI based on the furniture type. For example setting up the various areas on your UI for check boxes or what not and then populating how many check boxes are in the UI via blueprint logic. Another option is to create a template UI and then smaller sub-UI’s for each furniture type which you could inject into the template.

I’m not sure if I fully understand your question though so let me know. Hopefully I helped some still though

Can you share u project ? It not too hard. I cant talk much but you wanna use widget to change you furniture type right?
The First you add yours stuff to an array or table in to an actor name as y want.
Then y create widget with some button to choose. Finally bind an delegate into an actor like furniture.
Hope that help , I can share you some example if needed.

Thank you very much for the response,
The UI would be pretty much universal in terms of layout & functionality, however the UI would have to know how to edit many specifics blueprints (unit).
What I’m basically going for is the following:
Player walks up to a unit they’d like to edit in game
player hits ‘E’ to bring up UI (universal design) that has buttons like change handle, door, colour (Trace return value to get blueprint values)
Player clicks change handle option then selects a specific handle from drop down menu.

Now obviously not all units are the same in life, some have more doors & or drawers in many different setups hence why i’m creating a separate blueprint for each default style. I’ve set up sockets so handles & doors can be attached correctly in the blueprints but apart from that the main logic for each blueprint will do the same thing (i think).

I think as i progress through the project I will know more specifically my issues. I’m just trying to avoid them before i reach them XD
Does this sound like a good plan?

Many Thanks, :L

What you have set up here seems like a good start. There are easier ways and harder ways to accomplish what you are looking to do. For example if you knew all units had to have handles, doors, and colours (Including 0) you could set up an array for handles, an array for doors, and an array for colors. If, for example, the door array is empty - that would signify the unit doesn’t have any doors.

This method will really shine if you have set your units up using inheritance. For example if you have a blueprint named ‘Unit’ which contains these generalized arrays and then you create child arrays for each specific unit all you have to do from your UMG blueprint is cast to the base ‘Unit’ blueprint to get or set those array values. From there, you create a function in the base ‘Unit’ blueprint called something like ‘Update Unit.’ Then, in each of your child blueprints (The blueprints for the specific units) you can override this ‘Update Unit’ function with blueprint node specific to that Unit.

Does that make sense?

The above mentioned method for ‘Update Units’ would also work for ‘Change Unit’ and also ‘Retrieve Unit.’ It really comes down to how you want to implement it. Honestly - using ‘Change Unit’ and ‘Retrieve Unit’ would reduce a lot of clutter in your UMG blueprint, but requires a solid understanding of inheritance.

Thank you very much for your feedback,
I was originally thinking something along those lines with all of the arrays but i didn’t really know where to start nor how to string it into a sentence to even ask XD
I guess i should look into child arrays & inheritance. I failed to mention that i’m also changing defaults doors/handles in the construction script before gameplay. What I’m making is for different clients (customers) so they may already want a non default unit. Would what you posted above still work???

it really means a lot to me fo your feedback. Would you mind if i updated you on my progress later? :slight_smile:
Thanks :slight_smile:

Edit: are you also basically saying i should use child Blueprints? :stuck_out_tongue:

Not a problem and I would love to be kept updated. I’m curious to see how it all turns out.

In terms of your construction script, that would be totally fine! I may suggest modifying it such that the construction script modifies the arrays and proceeds to call ‘Update Units’ rather than changing the units directly. This way you not only have different default values, but those values are also persisted into the array by default.

I have a few minutes extra right now, so I’ll draw up a quick diagram of the inheirtance structure I was attempting to explain above. I’m hoping it’ll clear things up a bit for you.

The purpose of each event is:

  1. Retrieve Unit -> Return the arrays from the Unit in order to use their values
  2. Modify Unit -> Pass values to this event in order to have the Unit update its values
  3. Update Unit -> Apply the changes to the unit by changing the mesh/sockets

IMPORTANT: I labelled ‘Retrieve Unit’ as an event, in reality since we want this to return values it cannot be an event; it would actually have to be a function.

Thanks again, shall keep you updated :slight_smile:

P:S i’ll be sure to have you credited somewhere once this is all finished :slight_smile:

Thanks Mellark for the brief overview of inheritance. I’m at the stage in my learning that I"m trying to read everything about UE4 I can, and I feel that your diagram will help me in the future.

Still early on in the project so not much to show :frowning:
But If you do have any examples then yes please!!! :smiley:
Thank you

I’m Unfortunately still struggling a lot with this after quiet some some. This is something I really want to get done, I’ve been trying to follow your guidelines believing it is very close to what i want it to be. Is there any additional comments/content you could provide? or maybe even a stripped down example?

I appreciate your help, Many Thanks,

The 3 units represent my test, the two to the left are child BP’s of the Master Unit (Right) and for now represent different units & display different names once clicked on.
Currently i can only get the door changes to happen on the masterUnitBP & Not the children. As you can see im still super early on in development, i would just really love to get the core of this functionality working before hand. I hope you can help with my above request of a little example. Many Thanks again