Quantcast
Channel: Answers by "AyAMrau"
Viewing all articles
Browse latest Browse all 91

Answer by AyAMrau

$
0
0
Here is an example code for simply replacing the image to another one assigned in editor, but you can obviously get it some other way. using UnityEngine; using UnityEngine.UI; public class SpriteReplace : MonoBehaviour { [SerializeField] private Sprite sprite = null; // Assigned in editor // Use this for initialization void Start() { gameObject.GetComponent().sprite = sprite; } }

Viewing all articles
Browse latest Browse all 91

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>