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];
}
↧