private void Start() { assetOptions = new List <Transform>(); characterCounter = 0; if (characters.Count > 1) { GenerateCharactersUI(); } else if (characters.Count == 1) { presets = characters[characterCounter].gameObject.GetComponent <PresetCharacter>(); GeneratePresetUI(); ActivatePlayerCharacter(); } }
private void ActivateCharacter(OptionsHolder optionsHolder) { characters[characterCounter].gameObject.SetActive(false); if (presets != null) { presets.DeactivatePreset(); } characters[optionsHolder.assetList.value].gameObject.SetActive(true); presets = characters[optionsHolder.assetList.value].gameObject.GetComponent <PresetCharacter>(); characterCounter = optionsHolder.assetList.value; GeneratePresetUI(); ActivatePlayerCharacter(); optionsHolder.CheckButtons(); }