I am making a space invaders game, and have a script attached to a separated gameObject that instantiates Enemies. I can drag in the prefab and make it work, but then I want the enemies to spawn bullets themselves, with the bullet being a prefab.
I have started with just creating a variable for the bullet, but how would I access the prefab in script, as if I just drag it into the prefab, it won't be useable after the prefab is instantiated.
GameObject bullet;
void Start() {
bullet = // Insert Function to access prefab
}
Thanks