Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class serverHandle : MonoBehaviour {
- private PhotonView masterView;
- // Use this for initialization
- void Start () {
- PhotonNetwork.ConnectUsingSettings("v1.0");
- PhotonNetwork.automaticallySyncScene = true;
- }
- public void ChangeLevelMaster()
- {
- if (PhotonNetwork.masterClient.isMasterClient)
- {
- }
- }
- // Update is called once per frame
- void Update () {
- }
- void OnGUI()
- {
- GUILayout.Label(PhotonNetwork.connectionStateDetailed.ToString());
- }
- void OnJoinedLobby ()
- {
- PhotonNetwork.CreateRoom(null);
- PhotonNetwork.LoadLevel("Level1");
- Debug.Log("i hate servers");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement