I have a Question on how i can pick a gameObject from a collection e.g.
public class Weapon_Rifle : MonoBehaviour {
public GameObject Bullet;
public GameObject[] BulletHoles;
public int ShotCoolDown;
public int weaponRecoil;
void Update (){
if (Input.GetButton("Fire1") && ShotCooldown <= 0 && weaponRecoil == 0) { Instantiate(Bullet, BulletHole.Element1.transform.position, gameObject.transform.rotation);
}
}
I know that Bullethole.Element1 doesn’t work but how do can I do that?