using System.Collections; using System.Collections.Generic; using UnityEngine; public class FindEnemy : MonoBehaviour { void Start() { GameObject[] gameObjects; gameObjects = GameObject.FindGameObjectsWithTag("Enemy"); if (gameObjects.Length == 0) { Debug.Log("No game objects are tagged with 'Enemy'. Opening door"); } } }