Hello everyone!
I’m currently trying to build some procedural geometry to create furniture. Think about some kind if Archviz. I would like to be able to inspect the variables of a specific actor at runtime. For example, for a bed, I could have a certain number of legs, pillows, whatever. Another item could be a door with different parameters. The idea is to be able to inspect each item variables by showing a widget that also allows to modify the variables and update the object accordingly.
My first approach was adding a WidgetComponent to a base class and give referentes to each specific Widget.
Then I was LineTracing to find a valid actor that contained the WidgetComponent to create and show the widget. I was passing the owning actor to the widget and then casting to the proper underlying type inside of the widget…
However, I’m not sure about this approach. If I wanted to select multiple instances of the same class, I would like to update all instances with the same values. This requires me to cache an array of AActor* and cast one by one inside each Widget class.
I thought about creating a base class with a determines set of fields which you can give name and values on the derived types. Im not sure how to approach this or if Its just fundamentally flawed.
Any ideas?