Placing prefabs with overloaded constructors

I am making a rts and when you press a button on the GUI it spawns a prefab and i was wondering if there was a way to, first, overload a function when i press the button and, second, how to spawn a prefab based on the info provided to the function when i press the button. I know i will have to elaborate so if need be ask any questions. (sorry I’m a terrible writer)

If you want to overloaded functions you would just have a number of functions with the same names but that take different arguments. When you press the button it would need to call up the function with whatever arguments you want. This way one button could call up different overloaded functions.

I see this working with a bunch of enums or bools that determine which function overload to call. Then the button acts as the gate that then runs the function at the correct overload.

If you want to overloaded functions you would just have a number of functions with the same names but that take different arguments. When you press the button it would need to call up the function with whatever arguments you want. This way one button could call up different overloaded functions.

I see this working with a bunch of enums or bools that determine which function overload to call. Then the button acts as the gate that then runs the function at the correct overload.