unity object assign tag code example Example 1: How to change an objects tag in script gameObject.tag = "newtag"; Example 2: HOW TO SET TAG IN SCRIPT UNITY gameObject.tag