I have a variable of type GameObject that I am actually assigning (dragging) a prefab using the Inspector. My goal is to use 6 different prefabs and assign them randomly to such a GameObject. One solution I found is to declare 6 GameObject variables and drag its own prefab to each one of them, but I would like to use only one GameObject variable and randomly assign one of the 6 prefabs in code at run-time. How can I achieve this funcionality?
I will very much appreciate your help.