Hello, i have an issue with changing image of button via script.
When i write buttonImage.image=newImage i get error mentioned in the title of this thread.
New image is a texture2D, it must be changed to sprite but i dont know how to do that. Please help me
later this itemIcon = Resources.Load(“Item Icons/”+name);
And in other script im using GUI.DrawTexture thats why i cant change itemIcon to sprite because id be getting error in DrawTexture function. I must change itemIcon to sprite somehow