how to get into one GUI all rooms with 3 different Applicati

Options
Hello !

Please help me !

I bought 3 Application Id
AppID 1 = 1 000 CCU = EU
AppID 2 = 1 000 CCU = US
AppID 3 = 1 000 CCU = Asia

how to get into one GUI all rooms with 3 different Application ID ?

Comments

  • vadim
    Options
    Hi,

    If you want to connect with different app ids depending on user choice then try set PhotonNetwork.PhotonServerSettings.AppID = "your app id"; before PhotonNetwork.ConnectUsingSettings() call
  • ATDSVW
    edited September 2014
    Options
    I create new script
    using UnityEngine;
    using System.Collections;
    
    public class NewServer : MonoBehaviour
    {
    	public string AppID1 = "xxxxxxxx-0000-00xx-xxxx-000000000000";
    	public string AppID2 = "xxxxxxxx-0000-00xx-xxxx-000000000000";
    	public string AppID3 = "xxxxxxxx-0000-00xx-xxxx-000000000000";
    
    	public int AppID1StatusOnline = 0;
    	public int AppID1StatusRoom = 0;
    	public int AppID2StatusOnline = 0;
    	public int AppID2StatusRoom = 0;
    	public int AppID3StatusOnline = 0;
    	public int AppID3StatusRoom = 0;
    
    	void OnGUI()
    	{
    //		GUI.Label(new Rect (50, 20, 200, 25), PhotonNetwork.countOfPlayers + " users are online in " + PhotonNetwork.countOfRooms + " rooms.");
    
    		GUI.Label(new Rect (50, 20, 200, 25), AppID1StatusOnline + " users are online in " + AppID1StatusRoom + " rooms.");
    		GUI.Label(new Rect (50, 50, 200, 25), AppID2StatusOnline + " users are online in " + AppID2StatusRoom + " rooms.");
    		GUI.Label(new Rect (50, 80, 200, 25), AppID3StatusOnline + " users are online in " + AppID3StatusRoom + " rooms.");
    		
    		if (GUI.Button (new Rect (50, 110, 200, 25), "Scan online server"))
    		{
    			StartScan();
    		}
    	}
    
    	void StartScan ()
    	{
    		PhotonNetwork.ConnectToMaster ("app-eu.exitgamescloud.com", 5055, AppID1, "1.0");
    		AppID1StatusOnline = PhotonNetwork.countOfPlayers;
    		AppID1StatusRoom = PhotonNetwork.countOfRooms;
    		
    		PhotonNetwork.ConnectToMaster ("app-eu.exitgamescloud.com", 5055, AppID2, "1.0");
    		AppID2StatusOnline = PhotonNetwork.countOfPlayers;
    		AppID2StatusRoom = PhotonNetwork.countOfRooms;
    		
    		PhotonNetwork.ConnectToMaster ("app-eu.exitgamescloud.com", 5055, AppID3, "1.0");
    		AppID3StatusOnline = PhotonNetwork.countOfPlayers;
    		AppID3StatusRoom = PhotonNetwork.countOfRooms;
    	}
    }
    

    Unity3D Send me Debug.Log -> (!)-ConnectToMaster() failed. Can only connect while in state 'Disconnected'. Current state:

    Play -> Unity3D no correction information send me !
    Unity3D send me information all AppID1 !
    Unity3D install AppID1 -> cheking information -> no select AppID2 AppID3 -> Send me information AppID2 of AppID1 !
    Bag Unity ?
    First press button information error
    Next press button information send me

    help me reader information AppID1 AppID2 AppID3
  • vadim
    Options
    You can't connect 3 different apps at the same time in PUN.
    Why do you need that?
  • ATDSVW
    edited September 2014
    Options
    vadim wrote:
    You can't connect 3 different apps at the same time in PUN.
    Why do you need that?

    1) Server AppID1 = Europe
    2) Server AppID2 = Asia
    3) Server AppID3 = USA

    i development similar to the game "Lineage 2"

    1.jpg
    2.jpg
    3.jpg

    help mi please !
  • vadim
    Options
    I suppose that you do not need to connect all apps to show the menu.
    Can you instead connect one app, chosen by user in menu?
    Or gameplay requires presence in 3 different apps/rooms simultaneously?
  • vadim wrote:
    I suppose that you do not need to connect all apps to show the menu.
    Can you instead connect one app, chosen by user in menu?
    Or gameplay requires presence in 3 different apps/rooms simultaneously?

    u1.jpg
    u2.png

    I want only to withdraw online from various server , if AppID = 1000 to remove the connect button
    using UnityEngine;
    using System.Collections;
    
    public class NewServer : MonoBehaviour
    {
       public string AppID1 = "xxxxxxx-xxxxxxxxx-xxxxxxx-xxxxxxx";
       public string AppID2 = "xxxxxxx-xxxxxxxxx-xxxxxxx-xxxxxxx";
       public string AppID3 = "xxxxxxx-xxxxxxxxx-xxxxxxx-xxxxxxx";
    
    ...
    ...
    ...
    
    if( PhotonNetwork.countOfPlayers == 1000)
    {
        GUI.Lable (new Rect (........), "Max Player")
    }
    else
    {
        if(GUI.Button (new Rect (.......), "Connect"))
        {
             PhotonNetwork.PhotonServerSettings.AppID = AppID1;
        }
    }
    
  • vadim
    Options
    Looks like you want connect 3 different lobbies. Again, PUN can't do that.
    But you can try Photon Unity3d SDK. Create 3 Photon clients with it at the same time.
    After server chosen, switch to normal PUN workflow.
  • Tobias
    Options
    You can select a server before you connect in PUN. So you could support server selection by disconnecting and re-connecting in PUN.
    This is described in the API documentation that's in the package.

    Currently, you can't access how many players are active per region unless you connect to it.
    PUN is not a MMO framework and will not work with 1000 users in a room. You will need to split your map into sharded segments until each has < 30 players or you will have to do way more work and implement client AND server in Photon so that they do interest management.