public class base_trigger : MonoBehaviour
{
void OnTriggerStay(Collider c)
{
if ( c.transform.name == “base trigger” ) {
transform.tag =“builded”;
}
else {
transform.tag =“builder”;
}
}
}
I’m trying to change tag of a spawn grid, if there is a object builded on it but, I want it to change back to his original tag ( builder) when the object that builded o the him destroyed or deleted.
I can change the tag from builder to builded with no problem but when I delete or destroy the game object on it, I did not change its tag to the original tag.
I wonder if any of you can help me, I realy don not understand why my code is not working.
Thanks in advance…