Created
May 25, 2015 04:41
-
-
Save haydenjameslee/b549213497fa6cf702d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class NetworkController : MonoBehaviour | |
{ | |
string _room = "Tutorial_Convrge"; | |
void Start() | |
{ | |
PhotonNetwork.ConnectUsingSettings("0.1"); | |
} | |
void OnJoinedLobby() | |
{ | |
Debug.Log("joined lobby"); | |
RoomOptions roomOptions = new RoomOptions() { }; | |
PhotonNetwork.JoinOrCreateRoom(_room, roomOptions, TypedLobby.Default); | |
} | |
void OnJoinedRoom() | |
{ | |
PhotonNetwork.Instantiate("NetworkedPlayer", Vector3.zero, Quaternion.identity, 0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment