Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class serverHandle : MonoBehaviour {
  6. private PhotonView masterView;
  7.  
  8. // Use this for initialization
  9. void Start () {
  10. PhotonNetwork.ConnectUsingSettings("v1.0");
  11. PhotonNetwork.automaticallySyncScene = true;
  12. }
  13. public void ChangeLevelMaster()
  14. {
  15. if (PhotonNetwork.masterClient.isMasterClient)
  16. {
  17.  
  18. }
  19. }
  20.  
  21. // Update is called once per frame
  22. void Update () {
  23.  
  24. }
  25.  
  26. void OnGUI()
  27. {
  28. GUILayout.Label(PhotonNetwork.connectionStateDetailed.ToString());
  29. }
  30.  
  31. void OnJoinedLobby ()
  32. {
  33. PhotonNetwork.CreateRoom(null);
  34. PhotonNetwork.LoadLevel("Level1");
  35. Debug.Log("i hate servers");
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement