Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

Setting player name in Menu, then online

$
0
0
Hi :)
In Menu scene i've got input field where player type his nick, then he join the game:
Code (csharp):
  1.  
  2. using UnityEngine;
  3. using UnityEngine.UI;
  4. using UnityEngine.Networking;
  5.  
  6. public class Network_Manager : NetworkManager {
  7.  
  8.     void Awake()
  9.     {
  10.         playerName = GameObject.Find("CharacterName").transform.FindChild("Text").GetComponent<Text>();
  11.     }
  12.  
  13.     public void JoinGame()
  14.     {
  15.         if (CharacterName() != null)
  16.         {
  17.             PlayerPrefs.SetString("PlayerName",...
Setting player name in Menu, then online

Viewing all articles
Browse latest Browse all 16796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>