I am building a top-down 3D game, where the player is allowed to build different types of buildings. To get a mental idea of my game, take a look at a in-game screenshot for Age of empires II (click here).
To simplify things, let’s say the player can choose to either build a Stable, a **Monastery **or a Castle.
I am stuck between these two different options. Which one is the recommended way to go?
I create a single blueprint, which I could simply call BP_Building. This blueprint would hold a StaticMeshComponent called MeshComp, and an integer called BuildingType (0=Stable, 1=Monastery, 2=Castle).
Depending on what building type the player wishes to build**(clicking on the corresponding Widget icon, see this AoE2 example)**](https://www.wikihow.com/images/thumb/8/87/Create-a-Unit-in-Age-of-Empires-Step-6-Version-2.jpg/aid6570506-v4-728px-Create-a-Unit-in-Age-of-Empires-Step-6-Version-2.jpg), I would instantiate a BP_Building and fill in the MeshComp and BuildingType values accordingly, during runtime.
I create 3 separate blueprints: BP_Stable, BP_Monastery, and BP_Castle. Depending on which building the player wants to build, the corresponding Blueprint would be instantiated. [HR][/HR]
Since I’m a beginner I understand both ways are possible, but I think there might be a preferred way to go. Something that aligns better with UE4 design principles, if that makes sense. What do experienced UE4 game developers think?
Have a good day.