UnityScripterAI
Discord ↗
Link Copied to Clipboard
×
"return sprite of image"
public class GetSpriteOfImage: MonoBehaviour { Image m_Image; public Sprite m_Sprite; void Start() { m_Image = GetComponent<Image>(); } void Update() { if (Input.GetKey(KeyCode.Space)) { m_Image.sprite = m_Sprite; } } }