attach gameobject to script from custom editor code example
Example 1: unity change tag in script
gameObject.tag = "NewTagName"
Example 2: make an object disappear from a c# script unity
public GameObject ObjectToDisappear;
void Start()
{
ObjectToDisappear.GetComponent<Renderer>().enabled = false;
}