Unity get the object by script code example Example: unity get script from gameobject obj.GetComponent<Script>();