| | |
| | | return; |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(_id)) |
| | | { |
| | | Debug.LogError("Image SetSprite id is null or empty " + _id); |
| | | return; |
| | | } |
| | | |
| | | var sprite = UILoader.LoadSprite(_id); |
| | | _image.overrideSprite = sprite; |
| | | } |
| | |
| | | return; |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(_id)) |
| | | { |
| | | Debug.LogError("TextImage SetSprite id is null or empty " + _id); |
| | | return; |
| | | } |
| | | |
| | | var sprite = UILoader.LoadSprite(_id); |
| | | _textImage.sprite = sprite; |
| | | } |
| | |
| | | { |
| | | if (_image == null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(iconName)) |
| | | { |
| | | Debug.LogError("SetOrgSprite iconName is null or empty " + iconName); |
| | | return; |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(itemConfig.IconKey)) |
| | | { |
| | | Debug.LogError("SetItemSprite IconKey is null or empty for itemID " + itemID); |
| | | return; |
| | | } |
| | | |
| | | var sprite = UILoader.LoadSprite("icon", itemConfig.IconKey); |
| | | _image.overrideSprite = sprite; |
| | | } |
| | |
| | | var skillConfig = SkillConfig.Get(skillID); |
| | | if (skillConfig == null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(skillConfig.IconName)) |
| | | { |
| | | Debug.LogError("SetSkillSprite IconName is null or empty for skillID " + skillID); |
| | | return; |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(_id)) |
| | | { |
| | | Debug.LogError("SetTexture2DPNG id is null or empty " + _id); |
| | | return; |
| | | } |
| | | |
| | | var texture = UILoader.LoadTexture2DPNG(_id); |
| | | _image.texture = texture; |
| | | } |