get gameObject from raycast hit unity code example Example: raycast hit gameobject RaycastHit.transform.gameObject : GameObject