Here is the code for my forward selection:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CustomizeModels : MonoBehaviour
{ public GameObject[] outfits;
private int currentOutfit;
void Start()
{
currentOutfit = 0;
}
void Update()
{
for (int i = 0; i < outfits.Length; i++)
{
if (i == currentOutfit)
{
outfits[i].SetActive(true);
}
else
{
outfits[i].SetActive(false);
}
}
}
public void SwitchOutfits()
{
if (currentOutfit == outfits.Length - 1)
{
currentOutfit = 1;
}
else
{
currentOutfit++;
}
}
}
How do I create a backward selection?