getcomponent button code example Example: Button.GetComponent Button yourButton = yourObject.GetComponent<Button>();