public void CreatePickup(GameObject gunObj) { GunPickup item = Instantiate(gunPickupPrefab).GetComponent <GunPickup>(); item.transform.position = RandomlySpawnOnNavMesh.RandomPoint(); item.gunObj = gunObj.gameObject; }
private void Awake() { instance = this; RandomlySpawnOnNavMesh.Radius = radius; }