Let's say I have 5 different enemy prefabs. I won't know until runtime which prefab I want to be spawning.
I know that normally I can make a `public GameObject` variable that I can link to a script.
What's the best way to link the prefab programmatically to accomplish this? It doesn't seem very efficient to have multiple variables for each prefab that I have to write boiler plate code to handle each :).
↧