Photon Networking Guide

It’s in between those. RPCs are sent as single message, while synchronization messages (multiple times per second) are accumulated per group.

I just verified with ExitGames, and the answer is yes.

Hi Mike i have this errors in latest guide :frowning: i try different photon id but same errors.

createGame failed, client stays on masterserver: OperationResponse 227: ReturnCode: 32766 (A game with the specified id already exist.). Parameters: {}.

When i try automatching i have this error !!!

Illegal view ID:0 method: SpawnOnNetwork GO:code

“createGame failed, client stays on masterserver: OperationResponse 227: ReturnCode: 32766 (A game with the specified id already exist.). Parameters: {}.”

You cannot create multiple rooms with the same name. If you dont care about room name you can always pass null in PhotonNetwork.CreateRoom and PUN will generate a unqiue ID for the room.

“When i try automatching i have this error !!!
Illegal view ID:0 method: SpawnOnNetwork GO:code”
Is this in the original guide? I’ll have to check it.

Yes i download 10 min ago from asset store. Just click in unity 3d ver 4 on automatch.Also RPC example have problem.

full error log

Illegal view ID:0 method: ApplyGlobalChatText GO:code
UnityEngine.Debug:LogError(Object)
NetworkingPeer:RPC(PhotonView, String, PhotonTargets, Object[ ]) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2311)
PhotonNetwork:RPC(PhotonView, String, PhotonTargets, Object[ ]) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1645)
PhotonView:RPC(String, PhotonTargets, Object[ ]) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:195)
Chat:AddGameChatMessage(String, Boolean) (at Assets/PUNGuide_M2H/Example1/C#/Chat.cs:217)
Chat:OnJoinedRoom() (at Assets/PUNGuide_M2H/Example1/C#/Chat.cs:52)
UnityEngine.Component:SendMessage(String, Object, SendMessageOptions)
NetworkingPeer:SendMonoMessage(PhotonNetworkingMessage, Object[ ]) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1409)
NetworkingPeer:OnEvent(EventData) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1288)
ExitGames.Client.Photon.PeerBase:smile:eserializeMessageAndCallback(Byte[ ])
ExitGames.Client.Photon.EnetPeer:smile:ispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:smile:ispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:65)

I check previous guide plugin 1.17 works good.

in chat example under guide plugin 1.17 on chat example we have this error

NullReferenceException: Object reference not set to an instance of an object
Chat.AddGameChatMessage (System.String str, Boolean systemMessage) (at Assets/PUNGuide_M2H/Example1/C#/Chat.cs:217)
Chat.OnJoinedRoom () (at Assets/PUNGuide_M2H/Example1/C#/Chat.cs:52)
UnityEngine.Component:SendMessage(String, Object, SendMessageOptions)

Are there any tutorials or guides on how to get an FPS, or MMO game running off a server AND setting up server side logic?

Imillionaire: Server side docs are only here AFAIK: Fusion 2 Introduction | Photon Engine

The guide has been updated to 1.20 and using the new and easier PhotonNetwork.LoadLevel (instead of disabling messagequeue and then Application.LoadLevel)

Hello M2H, I have a Digital Ocean account with 20GB, 512MB RAM… Can Photon Server run on it?

Hi,
I opened Photon Unity Networking Free and in Readme I see this:

Requirements

  • Unity iOS PRO and Unity Android PRO for exports to these platforms*

So, I can’t use Photon on iOS and Android with free license ?

Can you please share what the fix was?? You mention in your edit that it was working later, but I’m getting this error now, and I can’t get rid of it :wink:

Thanks very much,

John

Look for this method and add the code as I did… it is wierd, that this guy in the forum says in 2012 is going to fix it in the next release… but never did, or did no know how… :face_with_spiral_eyes:

void OnReceivedRoomListUpdate()
{
Debug.Log(“OnReceivedRoomListUpdate”);
Debug.Log("We received a room list update, total rooms now: " + PhotonNetwork.GetRoomList().Length);

string wantedRoomName = “TestRoom” + Application.loadedLevelName;
Debug.Log("wantedRoomName = " + wantedRoomName);

foreach(RoomInfo room in PhotonNetwork.GetRoomList())
{
if (room.name == wantedRoomName)
{
PhotonNetwork.JoinRoom(room.name);
Debug.Log(“PhotonNetwork.JoinRoom(room.name);” + room.name.ToString());
break;
}
}

}

Enjoy it!!! :smile:

1 Like

The error could actually be an expected one, which just belongs into the workflow.
If you try to create a room that’s already existing, you can’t just steal the name. Instead, you could join the room or come up with another name.
The workflow is explained briefly in the “Handling Errors” section of the Marco Polo tutorial as well:

This is unacceptable, most examples do not work with Unity 4.

How so? For me all examples work under U4. I don’t know of any incompatabilities between U3 and U4 in regards of PUN.

Hi,

I just bought and download your tutorial, and as others, I have an error on Tutorial 2A1, under U4. The second player cannot connect to the room, and got an :

createGame failed, client stays on masterserver: OperationResponse 227: ReturnCode: 32766 (A game with the specified id already exist.). Parameters: {}.

I have read this thread, but I don’t understand what to do, or which fix to do. Could you please help me ?

I love this guide so much,but i got a problem about the Example4 FPS Game,i change the Example4_Menu by use Example3_lobbymenu instead Example2_Multiplayer menu,when i hit play,everything’s fine.But when i hit the stop button,i got the error like Failed to ‘network-remove’ GameObject because it’s null. can you help me

1298665--60168--$Error.jpg

I think I have found : I have transferred all the code from OnReceivedRoomList() to OnReceivedRoomListUpdate(). It works for me. Is it the right solution ?

sylvain: I can’t see where you posted what you do now in OnReceivedRoomListUpdate() but if it’s working for you, this should be ok.

There is a simple mechanism to join a random game or create one with a random (automatically assigned) name:

I solved the problem by change the “Example3_Menu_Lobby” script’s LaunchGame function to below function,but i don’t know how it works than before

[RPC]
void LaunchGame()
{
LaunchingGameGUI();
//launchingGame = true;
}