using UnityEngine;
using System.Collections;
public class otro : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (Input.GetKeyDown(KeyCode.H)){
Destroy (GameObject.FindGameObjectsWithTag("enemy"));
}
}
}
I try to use it and gives me error, someone could help me? if i use GameObject.FindGameObjectWithTag yes works but only with one object with this tag not alls.