private void RegenerateProfessionButtons()
        {
            ProfessionButton[] professionButtons = professionButtonsRootTransform.GetComponentsInChildren <ProfessionButton>();
            int professionButtonCount            = professionButtons.Length;

            for (int i = 0; i < professionButtonCount; i++)
            {
                if (professionButtons[i] != professionButtonPrefab)
                {
                    DestroyImmediate(professionButtons[i].gameObject);
                }
            }

            professionButtonPrefab.gameObject.SetActive(true);
            ProfessionButton currentPlayerProfessionButton = GameObject.Instantiate <ProfessionButton>(professionButtonPrefab);

            currentPlayerProfessionButton.SetPlayerData(GameProxy.instance.PlayerInfo.playerData);
            currentPlayerProfessionButton.transform.SetParent(professionButtonsRootTransform, false);

            List <PlayerData> changeProfessionPlayerList = PlayerData.GetChangeProfessionPlayerDataList(GameProxy.instance.PlayerInfo.playerData);
            int changeProfessionPlayerListCount          = changeProfessionPlayerList.Count;

            for (int i = 0; i < changeProfessionPlayerListCount; i++)
            {
                ProfessionButton professionButton = GameObject.Instantiate <ProfessionButton>(professionButtonPrefab);
                professionButton.SetPlayerData(changeProfessionPlayerList[i]);
                professionButton.transform.SetParent(professionButtonsRootTransform, false);
            }
            professionButtonPrefab.gameObject.SetActive(false);
            professionButtonsRootTransform.localPosition = new Vector3(0, professionButtonsRootTransform.localPosition.y, professionButtonsRootTransform.localPosition.z);

            _selectedProfessionButton = currentPlayerProfessionButton;
        }
 public void ClickProfessionButton(ProfessionButton professionButton)
 {
     _selectedPlayerData       = professionButton.PlayerData;
     _selectedProfessionButton = professionButton;
     RefreshSelectedProfessionButtonIndicator();
     Refresh();
     //			if(!PlayerProxy.instance.IsPlayerUnlocked((int)_selectedPlayerData.Id))
     //			{
     //				ActivateProfessionView activateProfessionView = UIMgr.instance.Open<ActivateProfessionView>(ActivateProfessionView.PREFAB_PATH);
     //				activateProfessionView.SetPlayerData(_selectedPlayerData);
     //			}
 }