Let me explain my problem with my concrete example. I have a button prefab. A button prefab has a lot of configurations: background color, background shape, background image, text, text color, button type, text size, background size, etc.
I have a few places where I use the button prefab. In some places I can just manually put the prefab into the scene in-editor and preconfigure a button. But there are other places where I need to instantiate a batch of buttons with almost the same configuration.
Sure, I could setup each of these buttons in code during the instantiation. But that seems cumbersome. So, what I did is I added a button prefab to scene. Then configured it as I wish. Then hid it in the scene. Then created a script with a reference to a GameObject
and now instead of a prefab from a file explorer I put the hidden configured button in that reference. So, now during an instantiation I only need to change the enablement of the instantiated button instead of configuring it from code.
I am really eager to know if there is a better way to do what I am doing.