using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace RimWorldAnimationStudio { public class SexPropManager : MonoBehaviour { public List sexProps = new List(); public Dropdown sexPropDropdown; private SpriteRenderer spriteRenderer; public void OnEnable() { spriteRenderer = GetComponent(); foreach (SexProp sexProp in sexProps) { sexPropDropdown.options.Add(new Dropdown.OptionData(sexProp.label)); } } public void OnOptionChanged() { spriteRenderer.sprite = sexProps[sexPropDropdown.value].sprite; } } }