using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using UnityEngine.SceneManagement; public class RoleSelectView : MonoBehaviour { bool[] inited = {false, false}; void Start() { RenderPlayer(0); RenderPlayer(1); } void RenderPlayer(int playerIndex) { Transform root = this.transform.Find("Player" + (playerIndex + 1)); int roleID = PKGameMode.playerRoleIDs[playerIndex]; if (!inited[playerIndex]) { inited[playerIndex] = true; Button left = root.Find("Left").GetComponent