public void UI_SetRemotePlayerInfo(string UserID) { GameObject[] RemoteNameLabels = GameObject.FindGameObjectsWithTag("RemotePlayerName"); foreach (GameObject TextLabelObject in RemoteNameLabels) { Text PlayerText = TextLabelObject.GetComponent <Text>(); PlayerText.text = UserID; } }
//UI 라벨표시 부분 관련 public void UI_SetLocalPlayerInfo(string UserID) { GameObject[] LocalNameLabels = GameObject.FindGameObjectsWithTag("LocalPlayerName"); foreach (GameObject TextLabelObject in LocalNameLabels) { Text PlayerText = TextLabelObject.GetComponent <Text>(); PlayerText.text = UserID; } Debug.Log("Player Name set to: " + UserID); }
public void LoadPlayer() { string PlayerName = GameNetworkServer.Instance.UserID; GameObject[] LocalNameLabels = GameObject.FindGameObjectsWithTag("LocalPlayerName"); foreach (GameObject TextLabelObject in LocalNameLabels) { Text PlayerText = TextLabelObject.GetComponent <Text>(); PlayerText.text = PlayerName; } Debug.Log("Player Name set to: " + PlayerName); string RivalName = GameNetworkServer.Instance.RivalID; GameObject[] RemoteNameLabels = GameObject.FindGameObjectsWithTag("RemotePlayerName"); foreach (GameObject TextLabelObject in RemoteNameLabels) { Text PlayerText = TextLabelObject.GetComponent <Text>(); PlayerText.text = RivalName; } }