Hello, i got a strange but i have an array of sprites, i change uisprite like this:
void loadPlayers()
{
MyPlayers = Team.TeamMember;
int count = MyPlayers.Length;
for(int i=0; i < count;i++)
{
myGUIPlayers[i].PlayerName.text = MyPlayers[i]._playerName;
myGUIPlayers[i].PlayerIcon.spriteName = MyPlayers[i]._SpriteName;
myGUIPlayers[i].PlayerIcon.MarkAsChanged ();
Debug.Log (MyPlayers[i]._SpriteName);
}
}
so i have 2 player icons, the second one change, in the inspector sprite switch, the gui display the change.
but the first one in the inspector the name is change, but it become invisible! if i manually reselect the sprite in the inspector it display correctly.
any idea?
edit: its seems that only one sprite makes problem beause of it size, all the player icon are 50x50, and if i use a 150x150 it doesnt display with the code, but work well when i change in inspector.
so my problem is half solved if i only use same size of sprite