get gameobject script is attached to code example
Example 1: unity get gameobject script is attached to
this.gameObject
Example 2: 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