Cannot implicitly convert type 'UnityEngine.Sprite' to 'UnityEngine.UI.Graphic'
I get this error "Cannot implicitly convert type 'UnityEngine.Sprite' to 'UnityEngine.UI.Graphic'"
in this line of code PlaceHolderCharacterBtn.GetComponent<Button>().targetGraphic = SpawnedCharacterPrefab.GetComponent<SpriteRenderer>().sprite;
I know it has something to do with one is a sprite and one is a grapic, but i cant seem to find a fix.
Any help here?
(I can post the whole script if needed but it is just so messy atm and i dont think it is nessecary )
Comment