Set Element By Index

Example
using UnityEngine;
using AdvancedPeopleSystem;

public class DemoScript : MonoBehaviour
{
    public CharacterCustomization character;

    int weight = 0;
    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.Q))
        {
            var lastShirtIndex = character.Settings.shirtsPresets.Count - 1;
            character.SetElementByIndex(CharacterElementType.Shirt, Random.Range(-1, lastShirtIndex)); //Set shirt element by random
        }
    }
}
  • Press Q to randomly change a shirt element