unity get gameobject in script code example
Example 1: unity get script from gameobject
obj.GetComponent<Script>();
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