// set a skill tree icon for a skill public static void SetSkillSmallIcon(int id, string textureName) { Skill skill = ResourcesPrefabManager.Instance.GetItemPrefab(id) as Skill; var tex = SL.Instance.TextureData[textureName]; tex.filterMode = FilterMode.Bilinear; skill.SkillTreeIcon = TexReplacer.CreateSprite(tex); }
public void SetItemIcon(Item item, Texture2D icon) { var sprite = TexReplacer.CreateSprite(icon); At.SetValue(sprite, typeof(Item), item, "m_itemIcon"); }