unity get name of gameobject the script is assigned to code example
Example: how to reference this gameobject unity
// use the keyword "this"
this.SetActive(true);
// the line above will set the GameObject this script is attached to active
// use the keyword "this"
this.SetActive(true);
// the line above will set the GameObject this script is attached to active