/// <summary>
 /// Create buttons on the slider
 /// </summary>
 public void CreateButtons()
 {
     if (this._CreatedButtons)
     {
         return;
     }
     this._CreatedButtons = true;
     for (int i = 0; i < AssetFactory.Instance.HeadIcons.Length; i++)
     {
         GameObject objIcon = (GameObject)Instantiate(this.CharacterOutfitButtonPrefab);
         objIcon.transform.SetParent(this.HeadIconHolder.transform);
         objIcon.transform.localPosition = Vector3.zero;
         objIcon.transform.localScale    = Vector3.one;
         CharacterOutfitButton outfitButton = objIcon.GetComponent <CharacterOutfitButton>();
         outfitButton.DataBind(AssetFactory.Instance.HeadIcons[i], this, CharacterBodyType.Head, i);
         this._CurrentObjectTabDisplays.Add(objIcon);
     }
     for (int i = 0; i < AssetFactory.Instance.BodyIcons.Length; i++)
     {
         GameObject objIcon = (GameObject)Instantiate(this.CharacterOutfitButtonPrefab);
         objIcon.transform.SetParent(this.BodyIconHolder.transform);
         objIcon.transform.localPosition = Vector3.zero;
         objIcon.transform.localScale    = Vector3.one;
         CharacterOutfitButton outfitButton = objIcon.GetComponent <CharacterOutfitButton>();
         outfitButton.DataBind(AssetFactory.Instance.BodyIcons[i], this, CharacterBodyType.Body, i);
         this._CurrentObjectTabDisplays.Add(objIcon);
     }
     for (int i = 0; i < AssetFactory.Instance.LegIcons.Length; i++)
     {
         GameObject objIcon = (GameObject)Instantiate(this.CharacterOutfitButtonPrefab);
         objIcon.transform.SetParent(this.LegsIconHolder.transform);
         objIcon.transform.localPosition = Vector3.zero;
         objIcon.transform.localScale    = Vector3.one;
         CharacterOutfitButton outfitButton = objIcon.GetComponent <CharacterOutfitButton>();
         outfitButton.DataBind(AssetFactory.Instance.LegIcons[i], this, CharacterBodyType.Legs, i);
         this._CurrentObjectTabDisplays.Add(objIcon);
     }
 }
        /// <summary>
        /// Change Animator Layer Set
        /// </summary>
        public void ChangeAnimatorLayerSet(CharacterBodyType type, int layerType, bool setValue, Sprite icon)
        {
            switch (type)
            {
            case CharacterBodyType.Head:
                this.SelectedHeadIcon.sprite = icon;
                for (int i = 0; i < this.Head.layerCount; i++)
                {
                    this.Head.SetLayerWeight(i, i == layerType ? 1.0f : 0.0f);
                }

                if (setValue)
                {
                    this.CharacterEditPanel.CharacterConfig.HeadType = layerType;
                }
                break;

            case CharacterBodyType.Body:
                this.SelectedBodyIcon.sprite = icon;
                for (int i = 0; i < this.Body.layerCount; i++)
                {
                    this.Body.SetLayerWeight(i, i == layerType ? 1.0f : 0.0f);
                }
                for (int i = 0; i < this.ArmBehind.layerCount; i++)
                {
                    this.ArmBehind.SetLayerWeight(i, i == layerType ? 1.0f : 0.0f);
                }
                if (setValue)
                {
                    this.CharacterEditPanel.CharacterConfig.BodyType      = layerType;
                    this.CharacterEditPanel.CharacterConfig.ArmBehindType = layerType;
                }
                break;

            case CharacterBodyType.Legs:
                this.SelectedLegsIcon.sprite = icon;
                for (int i = 0; i < this.Legs.layerCount; i++)
                {
                    this.Legs.SetLayerWeight(i, i == layerType ? 1.0f : 0.0f);
                }
                if (setValue)
                {
                    this.CharacterEditPanel.CharacterConfig.LegsType = layerType;
                }
                break;

            default:
                break;
            }
            for (int i = 0; i < this._CurrentObjectTabDisplays.Count; i++)
            {
                CharacterOutfitButton outfitButton = this._CurrentObjectTabDisplays[i].GetComponent <CharacterOutfitButton>();
                if (outfitButton.CharacterBodyType != type)
                {
                    continue;
                }
                if (outfitButton.BodyType != layerType)
                {
                    outfitButton.ButtonToggle(true);
                }
            }
        }