Hello,
Im trying to do a list of skins (List of UI Buttons) for a weapon so when i press on one it selecting it on the list it will change the button sprite to a one with a frame, In the Editor everything is working just fine but after i build it and checking on my phone its not working.
I searched for an answer but i just found like 3-4 posts with the same problem about 6 mounths ago with no answers there.
Any help will welcome.
public void setCurrentShurikenSkin()
{
PlayerPrefs.SetString("Current_Shuriken", itemName);
XMLManager.ins.setCurrentShuriken();
setCurrentSkinButton();
}
public void setCurrentSkinButton()
{
if (this != currentShuriken)
{
Image btnImage = GameObject.Find(PlayerPrefs.GetString("Current_Shuriken")).GetComponent<Image>();
btnImage.sprite = CurrentSkinButton;
ItemBlock.currentShuriken.GetComponent<Image>().sprite = itemButton;
currentShuriken = this;
}
}
The setCurrentShuriken() method in the XMLManager just setting the isCurrent bool to true and the other ones on the list to false.