/// <summary>
        /// Event invoked when a character deletion is confirmed.
        /// </summary>
        private void OnCharacterDeleteConfirm()
        {
            if (this.m_DeletingCharacter == null)
            {
                return;
            }

            // If this character is selected
            if (this.m_DeletingCharacter.isSelected && this.m_CharactersContainer != null)
            {
                // Find and select new character
                foreach (Transform t in this.m_CharactersContainer)
                {
                    Demo_CharacterSelectList_Character character = t.gameObject.GetComponent <Demo_CharacterSelectList_Character>();

                    // If the character is not the one we are deleting
                    if (!character.Equals(this.m_DeletingCharacter))
                    {
                        character.SetSelected(true);
                        break;
                    }
                }
            }

            // Invoke the on delete event
            if (this.m_OnCharacterDelete != null)
            {
                this.m_OnCharacterDelete.Invoke(this.m_DeletingCharacter.characterInfo);
            }

            // Delete the character game object
            Destroy(this.m_DeletingCharacter.gameObject);
        }
        /// <summary>
        /// Adds a character to the character list.
        /// </summary>
        /// <param name="info">The character info.</param>
        /// <param name="selected">In the character should be selected.</param>
        public void AddCharacter(Demo_CharacterInfo info, bool selected)
        {
            if (this.m_CharacterPrefab == null || this.m_CharactersContainer == null)
            {
                return;
            }

            // Add the character
            GameObject model = Instantiate <GameObject>(this.m_CharacterPrefab);

            model.layer = this.m_CharactersContainer.gameObject.layer;
            model.transform.SetParent(this.m_CharactersContainer, false);
            model.transform.localScale    = this.m_CharacterPrefab.transform.localScale;
            model.transform.localPosition = this.m_CharacterPrefab.transform.localPosition;
            model.transform.localRotation = this.m_CharacterPrefab.transform.localRotation;

            // Get the character component
            Demo_CharacterSelectList_Character character = model.GetComponent <Demo_CharacterSelectList_Character>();

            if (character != null)
            {
                // Set the info
                character.SetCharacterInfo(info);

                // Set the toggle group
                character.SetToggleGroup(this.m_ToggleGroup);

                // Set the selected state
                character.SetSelected(selected);

                // Add on select listener
                character.AddOnSelectListener(OnCharacterSelected);

                // Add on delete listener
                character.AddOnDeleteListener(OnCharacterDeleteRequested);
            }
        }