How can I change an object’s tag whilst in playmode? So if something starts off as flammable, and then gets set on fire, I want to change the tag from flammable to burning. Here is the code
var fire : Transform;
var burntReplacement : Transform;
var burnTime = 5;
function OnCollisionEnter (col : Collision) {
if(col.gameObject.tag == "Burning"){
Instantiate (fire, transform.position, transform.rotation);
// Line below should change it, but doesn't. All the tags are pre-defined.
gameObject.tag == "Burning";
yield WaitForSeconds (burnTime);
Destroy (gameObject);
Instantiate (burntReplacement, transform.position, transform.rotation);
}
}