Advertisement
kadyr

Untitled

Sep 4th, 2021
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. using Photon.Pun;
  2. using UnityEngine.UI;
  3. using UnityEngine;
  4. using UnityEngine.SceneManagement;
  5. using Photon.Realtime;
  6. using System.Collections.Generic;
  7.  
  8. public class RoomManager : MonoBehaviourPunCallbacks
  9. {
  10. [SerializeField]
  11. private Text ChatText;
  12.  
  13. [SerializeField]
  14. private InputField chatInput;
  15.  
  16. void Log(string message)
  17. {
  18. Debug.Log(message);
  19. ChatText.text += "\n";
  20. ChatText.text += message;
  21. }
  22.  
  23. public override void OnPlayerEnteredRoom(Player player)
  24. {
  25. Log(player.NickName + "Вошёл в комнату!");
  26. }
  27.  
  28. public void LeaveRoom()
  29. {
  30. PhotonNetwork.LeaveRoom();
  31. }
  32. }
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement