Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Third Party Photon Unity Networking

Discussion in 'Multiplayer' started by tobiass, Aug 23, 2011.

  1. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,057
    In PUN 1.9 the PhotonNetwork values for countOfPlayersInRooms and countOfPlayers are incorrect.
    If you are relying on these values, you can fix them really quick by copy&paste.

    Please get the code here:
    http://forum.exitgames.com/viewtopic.php?f=17&t=1459
     
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,057
    I just uploaded a new version: v1.9.6.

    This time around, we support "Scene Objects" which stay in the room, as long as there are players.
    Also, we included a unitypackage with the "Marco Polo Tutorial".


    v 1.9.6 (20 March 2012)
    New: PhotonNetwork.InstantiateSceneObject to spawn scene based objects that persist even if the current master client drops (usefull for AI etc.)
    Improved: offline mode will now also fire OnJoinedRoom after calling CreateRoom
    Fixed: No null playerName when using offline mode
    Fixed: MC and ID's not set correctly after switching from offline mode to online
    v1.9.5 (05 March 2012)
    New: Delta compression has been added to the observe option of reliable PhotonViews. This greatly reduces the network bandwidth.
    Fixed: OnLeftRoom error.
    Fixed: Stats timer didn't reset
    Moved: OnPhotonSerializeView and OnPhotonInstantiate to enums.cs (PhotonNetworkingMessages)
     
  3. yusefkerr

    yusefkerr

    Joined:
    Apr 5, 2011
    Posts:
    179
    Hello, I'm trying to build the BootCampLiteLobby but I'm getting errors similar to ones posted in this thread and I wondered if there is a confirmed solution. The error is:

    I first tried with .Net 3.5, then with .Net 4, but had exactly the same issue. I'm using unity 3.5, but I noticed people were also having this issue with unity 3.4 so I don't think this is the cause of the problem. I'm using photon server v2.6 and windows 7 64.

    One thing that I dont understand that might be causing the problem is this:

    In the setup guide, it says "a) Extract ExitGames-Photon-Server_v2-6-0.zip parallel to \Assets folder"

    ...but on 08-30-2011, TobiasS said "Please make sure you didn't extract the server's zip into the Asset folder. Unity will try to load assemblies which are meant just for the server. This is not a problem on import of the package from asset store though. "

    I'm confused by this because it sounds like a contradiction. Might this (or anything else?) be causing the problem?
     
  4. yusefkerr

    yusefkerr

    Joined:
    Apr 5, 2011
    Posts:
    179
    Interesting...I installed a second version of this demo project from scratch and I don't get the error I mentioned above. As far as I can tell, I installed exactly the same files in exactly the same way so I still have no idea what went wrong.

    I now have the demo working on my own PC, I can open two different browser windows and connect via the webplayer to the same room, but I can't connect via the webplayer from other PC's (Ive tried other PC's in my house and also accross the web). I understand that I need to change the IP address and port in either the server settings or the project's "Game.cs" file (or both), but I'm having trouble working out what these should be set to. Are there any common solutions I should try? Much of the info I can find on photon seems to assume some prior knowledge of IP addresses (fair enough, but I'm stumped). The server is running from my PC, so should I use the public IP address that comes up when I google "what is my IP address", and what port info should I use? I've disabled my firewall...uh...anything else I should try?

    A little more info - I can access the webplayer up to the "register" login screen, but clicking "OK" from this screen doesn't lead anywhere.
     
  5. yusefkerr

    yusefkerr

    Joined:
    Apr 5, 2011
    Posts:
    179
    Hello, I'm still working on the same issue - I can run a game on just one PC, but can't connect from other computers accross the web. I notice that when I run the Photon Server test client, Im getting an error: "Receiving failed. SocketException: ConnectionReset".
     
  6. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,057
    yusefkerr:
    Good to read that the internal compiler error is gone away. I couldn't help with that, except for "please re-import into a new empty project".

    To find your "local IP" (which is working only in your local network), you could take a look at Photon's logs after your started it. Photon Control has an option to open those and you will be looking for "Adding UDP listener on :192.x.y.z".


    This thread is about Photon Unity Networking, which is very different from what the Photon Bootcamp Demo does. Please post issues with the Bootcamp Demo here.
     
  7. yusefkerr

    yusefkerr

    Joined:
    Apr 5, 2011
    Posts:
    179
    Thanks for your help TobiasS, I got it working in the end. Thanks for point ing out the difference between Unity networking and the bootcamp demo also.
     
  8. dustinandrew

    dustinandrew

    Joined:
    Apr 30, 2010
    Posts:
    102
    Just started using Photon in Unity. I created a simple test almost exactly the same as the DemoWorker one from the Asset Store. After connecting, I join/create a room which spawns a photon view ball the player can move. I open two clients, one running in Unity Editor, one in a browser and this error starts spamming once the browser client joins the room:

    Code (csharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. NetworkingPeer.ObjectIsSameWithInprecision (System.Object one, System.Object two) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2438)
    3. NetworkingPeer.DeltaCompressionWrite (.PhotonView view, System.Collections.Hashtable data) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2415)
    4. NetworkingPeer.WriteSerializeData (.PhotonView view) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2389)
    5. NetworkingPeer.RunViewUpdate () (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2279)
    6. PhotonHandler.Update () (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:90)
    My server settings:
    PhotonCloud
    app.exitgamescloud.com:5055

    I spawn the balls with PhotonNetwork.Instantiate once a player has joined the room.

    Here is the ball script, just sending position:
    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. [RequireComponent(typeof(Rigidbody))]
    5. public class Ball : Photon.MonoBehaviour {
    6.    
    7.    public float speed = 5;
    8.    
    9.    private Vector3 _correctPos = Vector3.zero;
    10.    
    11.    private void Awake() {
    12.       gameObject.name = gameObject.name + photonView.viewID.ID;
    13.      
    14.       TextMesh playerName = GetComponentInChildren<TextMesh>();
    15.      
    16.       if (photonView.isMine) {
    17.          // local player
    18.          playerName.text = PhotonNetwork.playerName;
    19.          renderer.material.color = Color.red;
    20.       } else {
    21.          // network player
    22.          playerName.text = PhotonNetwork.otherPlayers[0].name;
    23.          renderer.material.color = Color.blue;
    24.       }
    25.      
    26.       _correctPos = transform.position;
    27.    }
    28.    
    29.    private void Update() {
    30.       if (photonView.isMine) {
    31.          // local player
    32.          float x = Input.GetAxis("Horizontal") * Time.deltaTime * speed;
    33.          float y = Input.GetAxis("Vertical") * Time.deltaTime * speed;
    34.          transform.Translate(x, 0, y);
    35.          Camera.mainCamera.transform.LookAt(transform);
    36.       } else {
    37.          // network player
    38.            // smooth this, this looks good, at the cost of some accuracy
    39.          transform.position = Vector3.Lerp(transform.position, _correctPos, Time.deltaTime * 5);
    40.        }
    41.    }
    42.    
    43.    private void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info) {
    44.         if (stream.isWriting) {
    45.             // local player
    46.             stream.SendNext(transform.position);
    47.         } else {
    48.             // network player
    49.             _correctPos = (Vector3)stream.ReceiveNext();
    50.         }
    51.     }
    52. }
    This seems simple, what am I doing wrong? Any help?
     
  9. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    Could you try if this solves your problems?

    In NetworkingPeer.cs +- line 2436 there's currently this:
    Replace that with this:
    Please let me know if this works for you so that I can include it in the public PUN package.
     
  10. dustinandrew

    dustinandrew

    Joined:
    Apr 30, 2010
    Posts:
    102
    Thanks, sorry I couldn't respond sooner.

    That fixed the error, but I've got more issues.

    Whomever creates the room, can see the other player when they join, but the joining player doesn't see the player that created the room. The joining player shows this warning:

    Code (csharp):
    1. Received OnSerialization for view ID 1000. We have no such PhotonView! Ignored this if you're leaving a room. State: Joined
    2. UnityEngine.Debug:LogWarning(Object)
    3. NetworkingPeer:ReadOnSerialize(Hashtable, PhotonPlayer) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2504)
    4. NetworkingPeer:OnEvent(EventData) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1224)
    5. ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
    6. ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
    7. ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    8. PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:79)
    So I guess I'm not setting something up correctly.
     
  11. dustinandrew

    dustinandrew

    Joined:
    Apr 30, 2010
    Posts:
    102
    Ok I think I found the problem:

    http://forum.exitgames.com/viewtopic.php?f=17&t=1425
    http://forum.exitgames.com/viewtopic.php?f=3&t=1433

    I had a starting menu scene, then once you joined/created a room it loaded my game scene. The PhotonNetwork.playerName was set in the menu scene and recorded in playerPrefs, so I assumed it would hold going to the next scene. And it does, but now when I set it again in the game scene, it works and both players can see each other.

    Seems that the players do not know who is the master? And changing the playerName when loading a new scene calls NetworkPeer.SendPlayerName() which fixes this.

    EDIT: Also for anyone who has jumpy positions, found the answer here:
    http://forum.exitgames.com/viewtopic.php?f=17&t=1136
    PhotonView should observe a Photon.MonoBehaviour script and not the GameObject. This wasn't very clear. Maybe it would be better to have the PhotonView script automatically grab any Photon.MonoBehaviour script on the same gameObject.
     
    Last edited: Mar 29, 2012
  12. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,057
    We found some more things to do and fix ;)
    The new version is now up:


    v1.10 (16 April 2012)
    Note: Photon Cloud will automatically put PUN v1.10 clients into a new virtual app, so they don't see rooms of other clients.
    Added: Info on how to activate Photon Cloud Subscriptions that are bought through the Assset Store (this currently requires a mail by you). See readme.txt
    Fixed: OnLeftLobby is now called as expected
    Fixed: OnLeftRoom is now called as expected (also on disconnect from game server)
    Fixed: OnSerialize issue with null as object
    Fixed: PhotonNetwork.time now keeps it's precision even with high values for ServerTimestamp (fixed it's casting). This will update every ~15ms by default.
    Changed: playerList and otherPlayerList now return Player[] instead of List<Player> (simpler conversion)
    Changed: Optimized playerList and otherPlayerList. They are now cached and only created when some player is added or removed
    Added: PhotonNetwork.insideLobby
    Added: Comments for enum PeerState
    Added: In PhotonServerSettings you can now chose Offline mode
    Removed: PhotonNetwork.Instantiate(GameObject go, ...) variant. Use a resource name instead (folders work).
    Removed: PhotonNetwork.Destroy(int). Use PhotonNetwork.Destroy(PhotonView) instead.
    Added: Vital Network Statistics. These will help analyze issues with client-to-server communication by provinding (limited) insight in the client's timing. See below.
    Added: PhotonNetwork.NetworkStatisticsEnabled, .NetworkStatisticsReset and .NetworkStatisticsToString to control and get the vital stats.
    Fixed: OnFailedToConnectToPhoton() is no longer called for any connection loss but only while the connection is being established. Note: OnDisconnectedFromPhoton is called, too, to let you know when the connection is closed.
    Added: enum DisconnectCause for OnFailedToConnectToPhoton and OnConnectionFail
    Added: new callback/MonoEvent OnConnectionFail. This provides a DisconnectCause that hints at the cause for a connection loss. Note: OnDisconnectedFromPhoton is called, too, to let you know when the connection is closed.
    Added: Wizard now has a button to bring you to the Photon Cloud's Dashboard page (login)
    Fixed: An issue where Unity recompile (any file) caused the PhotonServerSettings to be wiped if the Wizard was open
    Updated: documentation JoinGame -> JoinRoom
    Updated: client library to a intermediate version (not yet released but improved with new features): v3.0.1.305
    Updated: to client lib v3.0.1.3 and added related release_history.txt
    Fixed: removed Unity 3.5+ compile warnings about PrefabUtility
    Fixed: ObjectIsSameWithInprecision
    Added: Warning (in log!) when a game server IP is 127.0.0.1 and you can't connect. Most likely this is a error in the configuration of the game server while hosting yourself
     
    Last edited: Apr 17, 2012
  13. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,057
    We found out that 1.10 has a bug when you create a room, leave it and create another.
    We will fix this and update 1.10 (without other API changes).
     
  14. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,057
    PUN v1.12 is now live, fixing the issues with the playerList and demo.
    I also implemented PhotonNetwork.SetPlayerCustomProperties to make usage of player properties (much) easier. Instead of setting them when creating (or joining) a room, you set them before you join or while you are in a room. This will sync the properties.

    Let us know how this does for you.
     
  15. the_gnoblin

    the_gnoblin

    Joined:
    Jan 10, 2009
    Posts:
    722
    superb! :)
     
  16. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,057
    A issue came up but is simple to fix:

    Room-filtering for join random room does not work. No matter if you add room-custom-properties to the lobby listing or not, join random accepts any room and joins it.
    To fix: In LoadbalancingPeer.OpJoinRandomRoom, line 141, use ParameterCode.GameProperties instead of ParameterCode.Properties.
    Going to be fixed in PUN 1.16 of course.
     
  17. ViralVector

    ViralVector

    Joined:
    Aug 20, 2011
    Posts:
    23
    I am making working on a project. I have the general set up. There is a menu scene and upon joining/creating rooms the user is moved to one of several map choices. This all works. The problem arises when a user decides to spawn in.

    Received OnSerialization for view ID 2000. We have no such PhotonView! Ignored this if you're leaving a room. State: Joined

    The users can not see each other avatar, even both receive the correct rpc calls.
     
  18. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    I think you're running into a common mistake: when connecting in the mainmenu, IMMEDIATELY turn of the message queue to make sure you're not getting buffered (spawn) events inside the main menu. Then load the game scene and turn on the message loop again. (see PhotonNetwork.isMessageQueueRunning or something..not exactly sure about the syntax!)

    If you don't do this; remote player objects will be spawned in the main menu, then you'll load the game scene and the remote player objects are deleted.

    The photon guide has more documentation and examples about this.
     
  19. ViralVector

    ViralVector

    Joined:
    Aug 20, 2011
    Posts:
    23
    I wish that was my issue. I am using the call back
    void OnJoinedRoom(){
    PhotonNetwork.isMessageQueueRunning = false;
    }
    Also i am running a yield for one second once the map is loaded before i re-enable it
    IEnumerator Start (){
    if(PhotonNetwork.connected != false PhotonNetwork.room != null){
    //Gather Points
    spawnPointsHolder = GameObject.Find("SpawnHolder").GetComponent<Transform>();
    points = spawnPointsHolder.GetComponentsInChildren<Transform>();
    //
    yield return new WaitForSeconds(1);
    PhotonNetwork.isMessageQueueRunning = true;
    //Register
    photonView.RPC("Register",PhotonTargets.AllBuffered,PhotonNetwork.playerName);
    }else{
    Application.LoadLevel("MainMenu");
    }

    }

    Even more puzzling is that the users have to hit a spawn button for spawning, so even if i wait for a user to load the map then hit spawn on both, same issue. ( i running one instance in unit another on my browser).
    The old users can't see new user's avatars and vice versa ( no one can see no one) but the rpc are going through.
     
    Last edited: May 10, 2012
  20. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,057
    Are you setting isMessageQueueRunning to true somewhere again?
    While this is false, no messages are dispatched.
     
  21. ViralVector

    ViralVector

    Joined:
    Aug 20, 2011
    Posts:
    23
    Yes in my Enumerated start method.
    I do a one second yield. then i set it back to true, in my actual maps, that is the only line of code that manages MessageQueueRunning; I assume that the rpcs would not execute if isMessageQueueRunning is still false?
     
  22. lucked

    lucked

    Joined:
    Jul 11, 2010
    Posts:
    111
    How can i create one server and auto-create a room thats the players will enter?
    Can give me a example?
     
  23. ViralVector

    ViralVector

    Joined:
    Aug 20, 2011
    Posts:
    23
    This problem is puzzling me everything works as should minus instantiate. This is the full stacktrace....I even set it up so the game menu execute in one scene even re-entering Photon player name on game start

    Received OnSerialization for view ID 3000. We have no such PhotonView! Ignored this if you're leaving a room. State: Joined
    UnityEngine.Debug:LogWarning(Object)
    NetworkingPeer:ReadOnSerialize(Hashtable, PhotonPlayer) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2578)
    NetworkingPeer:OnEvent(EventData) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1293)
    ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
    ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:79)
     
  24. ViralVector

    ViralVector

    Joined:
    Aug 20, 2011
    Posts:
    23
    never mind i seem to have figure it out...i just copied over the "ThirdPersonNetworkVik" from the viking demo, renamed edited to fit my code, as the problem came from serialization it works as should now
     
  25. Mohican

    Mohican

    Joined:
    May 17, 2012
    Posts:
    49
    I tested photon cloud and was pretty impressed with how easy the setup process was.

    Sadly though, I won't be able to use it since Photon Cloud does not support "authoritative servers".
    But it would be nice though if you guys ever develop an API for running "authoritative servers" on the cloud.

    Good continuation!
     
  26. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    We will def. check if and how some form of server side scripting could be possible.
    (In case you didn't know: you can also easily run the Photon servers (+loadbalancing) pretty much out of the box self-hosted).
     
  27. Mohican

    Mohican

    Joined:
    May 17, 2012
    Posts:
    49
    Thanks for the reply Leepo!
    The ideal case would be if Unity could let us run a lightweight subset of the engine, for physics (colliders) calculations.
    It's the one bit that is really needed for an authoritative dedicated server...
    All the rest could be done with scripts.
     
  28. trainergary

    trainergary

    Joined:
    Jun 6, 2011
    Posts:
    6
    I'm using the latest version (v3-0-24-3243-RC9) of the Photon Server, and I am having trouble getting a basic LAN connection between two computers. The problem is not the initial connection, however. Let's say computer A starts up, connects, and sits in the lobby. Computer B can also make it to the lobby on the same server. Computer A can create a room that will show up in the GUI room list of computer B. So we know that information is being successfully taken from the server. However, when computer B tries to join the room created by computer A, computer B starts an infinite loop that disconnect from the server, connects to it, authenticates, joins the lobby, attempts to join the room again, and disconnects again. It goes on like this forever. Why can't I get both computers into the same room?
     
  29. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,057
    trainergary:
    Most likely, this can be fixed with a little change to the config files. The loadbalancing worflow has 2 roles: MasterServer and GameServer. For the GameServer, you need to enter the IP/Address it has for players not on the same system.

    Please check out this post:
    http://forum.exitgames.com/viewtopic.php?f=17&t=1102&p=5470
     
  30. trainergary

    trainergary

    Joined:
    Jun 6, 2011
    Posts:
    6
    This seems to have worked. I'll have to try it out on a few different computers, but it's looking good. Thanks, Tobias.
     
  31. Fratyr

    Fratyr

    Joined:
    Sep 5, 2011
    Posts:
    20
    1. Can I run a server of my own for PUN? I don't want ExitGames's Cloud...I want my own.
    2. The tutorials that are available there from Leepo, does they include code comments, explanations and real working demo?
    Not like Lite and LiteLobby, which are pretty poor explained (sorry ExitGames, not trying to be harsh :) )
     
  32. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    Yep you can use the loadbalancing app for the server(s). This'll allow you to host one or multiple servers easily, using 1 master server.

    The advantage of these demos is that the code is clearer because it's all split up into small pieces, where the Lite/LiteLobby is a big chunk. There aren't a lot of comments, but they should be clear enough to get you going. If you want to get from PUN-0 to PUN-hero you can consider getting my PUN guide as it's fully documented.
     
  33. Fratyr

    Fratyr

    Joined:
    Sep 5, 2011
    Posts:
    20
    Hm.. previous post is gone...

    Leepo,

    What is and the difference between PUN-0 and PUN-hero?

    And if I buy separate PUN guide of yours, will I have to pay for this one as well to get PUN itself?

    And is there any support to your guide? Since there's not enough comments according to you, then a lot of questions might pop, even if you think your code is crystal clear.. It's always like that when reading someones code. :)
     
  34. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    Sorry, that was meant as in "if you want to learn PUN from the very basics.."

    PUN is available for free. The hosting needs to be paid for (either by buying Photon licenses if you want self-hosting, or by buying a cloud subscribtion). The PUN guide does come 6 month cloud hosting included.

    True, the PUN guide does have enough documentation as it goes trough all functionality via small examples, only a few bits at a time.
     
  35. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    410
    unless i'm missing somthing....you really need some more prices for indie server
    Free(100 CCU) or $800(unlimited CCU)...
    do some 500 and 1000 too....

    it's hard to judge how good a game will do...so some scaling prices would be helpful as a game grows.
     
  36. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
  37. augasur

    augasur

    Joined:
    Mar 4, 2012
    Posts:
    133
    I would like to know if Photon Server or Cloud works on Android basic?
     
  38. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    Both Android and iOS work but only on the PRO versions of Unity. Win&Mac work on Unity free.

    Edit: I didn't see that the question was about basic vs PRO unity
     
    Last edited: Jun 8, 2012
  39. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,057
    augas111: You will need Android Pro. DotNet Socket Support is required for any external networking solution.
     
  40. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,057
    Just updated to v1.15!
    No major API changes, so the update should be seamless but brings several fixes to less frequent issues. Anyone should update.

    v1.15 (11. June 2012)
    Fixed: PhotonMessageInfo.timestamp. The conversion of the sent ms-timestamp to a second-based timestamp double value was imprecise
    Fixed: Room-filtering for join random room did not work, cause a parameter code was wrong. Now, filtering works as expected.
    Changed: The Marco Polo Tutorial is no longer packaged but in a sub-folder of PUN. The scene/project for this is complete but in best case, you still work through the tutorial pdf.
    Added: short paragraph about the tutorial-result being in the PUN package to tutorial text
    Changed: OnFailedToConnectToPhoton is now called when the connection could not be established, OnConnectionFail is called when a established connection fails. The difference between both is sometimes minimal. In either case, OnDisconnectedFromPhoton is called afterwards, too.
    Changed: description of PhotonNetworkingMessage.OnDisconnectedFromPhoton, PhotonNetworkingMessage.OnConnectionFail and PhotonNetworkingMessage.OnFailedToConnectToPhoton according to above's changes
    Added: Warnings to log console when connections fail (showing the current address and a hint what might be wrong)
    Changed: If a script doesn't write any data to the stream in OnPhotonSerializeView(), then this view's update is not sent. This allows you to skip updates from within your own logic. Simply don't fill anything into the stream.
    Changed: Only when DeltaCompression is active, copies of sent and received data are cached. You can't change a PhotonView's synchronization method on the fly (that didn't work before, either).
    Fixed: MarcoPolo-Tutorial: audio was missing
    Updated: PUN version string to "1.15"
    Updated: to latest client lib v3.0.1.11 (some fixes from previous builds)
     
  41. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,057
    I just noticed that the content of the package wasn't updated with my upload of 1.15, so I had to re-upload.
    I verified that the new version is in the store now. It's the 1.15 package, labeled as 1.15.1 in the store.
     
  42. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,057
    We updated the Asset Store PUN package today.

    In this release, we finally generated the reference documentation (from code) and thus it's more or less complete. New sections, like "Public API" help you focus on the stuff that's meant to be used in games (versus the stuff PUN uses internally). Due to this, we made some more members protected or private (to hide them from the doc).
    Anyone who wants to take a look at the code: It's still there ;)

    Check out the details and update soon!

    v1.16 (3. August 2012)
    Updated: To being a Unity 3.5.3 package
    Updated: To Unity 4 compatibility
    Fixed: In-room player list didn't include players who didn't set any properties (no name and no custom properties)
    Fixed: PhotonViewInspector now displays owner as null if not set, instead of showing the PV as sceneView
    Updated: To new client lib. This is now thread safe, which means that a thread could call SendOutgoingCommands in intervals, as fallback when Update() is paused for too long
    Updated: Usage of the lib's NetworkSimulationSettings property (this is an internal change)
    Updated: Some links in the Setup Wizard window became outdated and are now fixed
    Updated: InstantiateSceneObject to use FindObjectsOfType less often, which improves performance
    Changed: Methods that are intended for PUN-internal use are now becoming internal or private instead of public. Public methods and classes are the ones really meant for game development
    Internal: RemoveAllInstantiatedObjects now also (re)sets the cacheInstantiationCount to 0
    Internal: Updated to new account service
    Internal: PhotonEditor was modified to be extended and customized. Saves if the setup wizard did open at least once. Also gets less updates.
    Added: JoinRandomRoom overload to use expectedCustomProperties. These can filter which properies a room must match to join it randomly.
    Changed: Documentation to be generated from code and topic files. This provides a complete reference documentation. The pdf is still the best option for a single-file document.
    Changed: Documentation was extended. "Timing for RPCs and Loading Levels" and the topics about the GUI elements available is new.
    Updated: The optional GUIs are now draggable windows and a bit cleaned up
    Changed: ServerSettings class has another value that needs serialization (maybe this means your serverSettings will have to be re-written after update).
    Updated: PUN version string to "1.16"
     
  43. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,057
    v1.16.2 is up now, fixing a compile bug. Due to upload issues, some demos now are 1.16.3 but that's the same version really.
    Sorry for the bunch of updates.
     
    Last edited: Aug 3, 2012
  44. jjobby

    jjobby

    Joined:
    Nov 28, 2009
    Posts:
    160
    When will you plan to add API support for authoritative servers in the cloud?
     
  45. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Free 20CCU option for the Cloud. Very Nice. ;)

    http://blog.exitgames.com/2012/08/free-photon-cloud/
     
  46. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,057
    Not too soon, I fear. You will have to make one client authoritative instead. I this is sub-optimal but currently the only solution with Photon.
    Depending on your project, you can host Photon and run Unity instances in the same datacenter, which makes it a feasible solution with hosted servers.
    The benefit of running Photon in this case is that you can do "server" work (like DB handling) in Photon and don't have to fit this into a Unity authoritative client.
     
  47. tydygunn

    tydygunn

    Joined:
    Aug 9, 2012
    Posts:
    13
    Hello! I fear that this is the wrong place to ask a question, so I posted it on Unity Answers if you had a minute to take a look:

    http://answers.unity3d.com/questions/313053/photon-cloud-networking-onphotonserializeview-not.html

    I'm not receiving the registration email for the Exit Games forums, otherwise I'd post in there. Thanks for your time!

    PS - The "Photon in 5 minutes" video is currently set to private (http://doc.exitgames.com/photon-server/PhotonIn5Min/). I've since decided to swap over to the Cloud because of that (which works beautifully by the way).
     
  48. e5an

    e5an

    Joined:
    Jul 6, 2012
    Posts:
    93
    Has anyone successfully modified any of the Photon Networking demos and got them to build from iOS Basic? I know that Photon "needs" the System .Net sockets support in iOS Advanced to work but I also have read more than one person suggesting that there are workarounds to that.

    ( I'll buy Unity Pro iOS Advanced someday but it would be nice to be able to try out the Photon demos get a head start on my second game now- since I don't currently have $3000 burning a hole in my pocket.)
     
  49. e5an

    e5an

    Joined:
    Jul 6, 2012
    Posts:
    93
    Not saying I want you to post your custom networking code, just a confirmation that "Yes, I got it to work by ____ing the ____ with a _______, it didn't take that long at all," or "Yes; but I had to write my own _____ing _____ ______er, and if you don't already know how to do that you shouldn't try."
     
  50. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,057
    tydygunn: I hope the registration mail arrived by now. I just tested this and it worked for me.
    In any case: PM me your mail address and I can unlock your account in our forum.
    The question in Answers is answered by now. Maybe you flag the reply as acceptable or comment what's still unanswered?

    Kiloblargh: I don't think it's possible to get around the licensing requirement for iOS and non-Unity networking, sorry.
    In worst case, make your game with Unity's networking and when it made $3.000 buy the license to switch over.