unity get reference of object that script is attached to code example Example: unity get gameobject script is attached to this.gameObject