unity for GetCompent Button code example Example: Button.GetComponent Button yourButton = yourObject.GetComponent<Button>();