using UnityEngine;
using System.Collections;
public class NetworkConnect : MonoBehaviour {
// Use this for initialization
void Start () {
PhotonNetwork.ConnectUsingSettings("alpha 0.1");
}
void OnGUI(){
GUILayout.Label(PhotonNetwork.connectionStateDetailed.ToString());
if(GUI.Button(new Rect(10, 10, 300, 50), "Random Match")){
PhotonNetwork.JoinRandomRoom();
}
void OnPhotonRandomJoinFailed(){
PhotonNetwork.CreateRoom(null);
}
void OnJoinedRoom(){
GameObject myPlayer = PhotonNetwork.Instantiate("PlayerNetwork", Vector3.zero, Quaternion.AngleAxis(180, Vector3.up), 0);
myPlayer.gameObject.tag = "myPlayer";
PlayerMoveScript playerMove = myPlayer.GetComponent<PlayerMoveScript>();
playerMove.isPlayer = true;
}
}
So that's my code for connecting and spawning into the game. How would I use app42 users with this code to ensure each player has their unique username and it's attached to the backend database? This is my first time dealing with any type of database so I'm a bit overwhelmed with the process.
Right now I have a script that creates a username, password, and emailid. What else do I need? What are the steps in doing this? I'm sorry for such newbie questions but I've done a lot of research and still feel like I'm missing something big. Any advice or help is greatly appreciated.