Quantcast
Channel: Latest Questions by Griffo
Viewing all articles
Browse latest Browse all 94

Change UI GUI Image Sprite at runtime .. Unity 5 .. js

$
0
0
Hi, I'm trying to swap a image sprite of a UI GUI but it's not swapping, what is wrong with my code ? .. I'm getting no errors. Thanks. #pragma strict import UnityEngine.UI; private var GUIweaponSprite : Sprite; function Start () { GUIweaponSprite = GameObject.Find("Info Disk Weapon").GetComponent.().sprite; } function OnGUI () { GUIweaponSprite = _weapons[2]; }

Viewing all articles
Browse latest Browse all 94

Trending Articles



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