mmorpg2d/Assets/Script/CharSelectionManager.cs
2024-09-26 20:53:03 +05:30

23 lines
463 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CharSelectionManager : MonoBehaviour
{
[SerializeField] private GameObject[] characterPrefabs;
public void ChangeCharacter(int index)
{
for (int i = 0; i < characterPrefabs.Length; i++)
{
characterPrefabs[i].SetActive(false);
}
characterPrefabs[index].SetActive(true);
}
void Update()
{
}
}