Answers for "unity button ui images"

CSS
1

uibutton image

let btnImage = UIImage(named: "image")
btnTwo.setImage(btnImage , for: .normal)
Posted by: Guest on June-12-2020
1

unity image

//Make sure you are using UnityEngine.UI
using UnityEngine.UI

//We can assign this image in the inspector
public Image image;
//Also assign this in the inspector
public Sprite mySprite;

public void ChangeImage () 
{
	image.sprite = mySprite;
}
Posted by: Guest on May-24-2020

Browse Popular Code Answers by Language