using UnityEngine;
using System.Collections;
public class blahblah : MonoBehaviour {
public GameObject Top;
void OnTriggerEnter(Collider other)
{
Top.SetActiveRecursively(false);
}
}
This script works perfectly but I only want it to happen with the player. I figured tags would be the trick but I am unsure on how to call them. I tried one method but it didnt work? (I only want the SetActive to happen when it is the player. I havent used tags much in my scripting thus the question.
Shouldn't be too hard to add.
I did google and what not just not much luck finding something similar (C# preferably)
Peace,