Search Unity

Third Party Photon PUN+

Discussion in 'Multiplayer' started by tobiass, Oct 9, 2013.

  1. drew_s

    drew_s

    Joined:
    Dec 9, 2014
    Posts:
    14
    Does the PUN+ work with turnbased multiplayer games? Or will I need the Photon Turnbased SDK for that to work?

    I was looking at the Photon Turnbased and noticed that I could not export to iOS when using the sample multiplayer memory game. I tested it out by deploying to web based and inside of the unity editor, however I wasn't sure if the PUN or Photon Turnbased is what I would need for a turnbased game. Think along the lines of a board game as far as how the turns go.

    Thanks!
     
  2. Beauty-Art-3D

    Beauty-Art-3D

    Joined:
    Dec 7, 2014
    Posts:
    1
    I have a few questions:

    The plugin PUN+ was 45$ this week on the asset store I think ( maybe I was distracted and it was another one ), so if I buy it I should have the 100 CCU upgrade ?

    Then about the app: If I go into the dashboard on the exit games site I can see my app but what are the App name and details ? Are there really important ?

    Because currently the "App name" is my email so should I rename it and put the name of my game ? ( I don't wanna do something silly :s )

    And a last question, the graphs never seem to work. My game isn't out but when I launch a game with myself ( ;_; ) to debug, it doesn't show any activity in the graph :/

    Thank you in advance for your time and answers :)
     
  3. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Is it possible to make it so that each player can have a unique player and password so that there aren't 5 people running around with the same name and I can track a stat or two (like high score or whatever)?
     
  4. StarGamess

    StarGamess

    Joined:
    Jul 21, 2014
    Posts:
    179
    How many user could be on one server without any lag? I'm very intersted in this package since i would like a cloud solution for my game and the one time purchage is great for me as an indie developer.
     
  5. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    In one game or one server? You are limited to 500 messages per room (game session) so its a solution for games with like 2-10 players per session (depending on your game of cause).

    There is no 'lag' on the 'server' as such. You just buy the amount of CCU you need.
     
  6. StarGamess

    StarGamess

    Joined:
    Jul 21, 2014
    Posts:
    179
    I mean per server and not per game. Yes but if you exceed a certain number of players on one server there will be lag right? because like you said you are limited to 500msg/second. But thanks for the reply.
     
  7. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Photon handles the LoadBalancing for servers. So the server will never lag, a game session will.
     
  8. StarGamess

    StarGamess

    Joined:
    Jul 21, 2014
    Posts:
    179
    Yes i'm sorry thats what i mean i would like to know at what amount of players, the players will start to experience lag?
     
  9. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Well you will hit the message limit before you hit lag. As i stated before then PUN is for games with 2-10 players approximately.
     
    StarGamess likes this.
  10. StarGamess

    StarGamess

    Joined:
    Jul 21, 2014
    Posts:
    179
    Oke thank you for the help.
     
  11. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
    PUN and PUN+ is not compatible with Turnbased games as it does not support returning to rooms. In that case, a returning client has to take an existing player ID (again) and that's not possible at the moment.
    We are looking into it but I can't promise how fast we can concentrate on this.

    Our Photon Turnbased SDK does not include the necessary native socket libraries which PUN+ has and so you need Unity Pro to export that to iOS/Android. Sorry.
     
  12. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
    Sorry for the really late reply. We took a while off during the holidays.

    1) If I buy it [PUN+] I should have the 100 CCU upgrade ?
    Yes. It's not fully automatic though: You need to apply the invoice ID from the Unity Asset Store to your Photon Cloud Subscription to get it.
    I added a description to this thread's first post.

    2) In the dashboard on the exit games site I can see my app but what are the App name and details ? Are there really important ?
    They are just for reference. It's easier to keep track. You can edit that.
    The AppId is the important piece.

    3) And a last question, the graphs never seem to work. My game isn't out but when I launch a game with myself ( ;_; ) to debug, it doesn't show any activity in the graph :/
    Please mail us to developer@exitgames.com and let us know your account's mail address. I am not sure what's the state of the graphs today. We work on a bigger update of those, so they might be broken temporarily.
     
  13. Funny-Face

    Funny-Face

    Joined:
    Nov 6, 2013
    Posts:
    17
    Hi,
    Due to mandatory 64 bit apps for iOS there is question:
    Does PUN+ have a 64bit version of native libraries? May you provide an ETA for such version, in case it isn't?
     
  14. Funny-Face

    Funny-Face

    Joined:
    Nov 6, 2013
    Posts:
    17
    OK, I've managed build it somehow with Unity 4.6.1p5. But during runtime PUN+ is completely broken. it's generate a lot of exceptions during connection phase:

    SynchronizationLockException: Object has not been locked by this thread.
    at ExitGames.Client.Photon.PhotonPeer.SendOutgoingCommands () [0x00000] in <filename unknown>:0
    at PhotonHandler.Update () [0x00000] in <filename unknown>:0
    (Filename: currently not available on il2cpp Line: 4294967295)

    and


    Receive issue. State: Connected Exception: System.Threading.SynchronizationLockException: Object has not been locked by this thread.
    at System.Threading.Monitor.Exit (System.Object obj) [0x00000] in <filename unknown>:0
    at ExitGames.Client.Photon.SocketUdpNativeStatic.ReceiveLoop () [0x00000] in <filename unknown>:0
    at System.Threading.ThreadStart.Invoke () [0x00000] in <filename unknown>:0
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:LogError(Object)
    PhotonHandler:DebugReturn(DebugLevel, String)
    NetworkingPeer:DebugReturn(DebugLevel, String)
    ExitGames.Client.Photon.<>c__DisplayClass2:<EnqueueDebugReturn>b__0()
    ExitGames.Client.Photon.MyAction:Invoke()
    ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    PhotonHandler:Update()

    (Filename: /Users/builduser/buildslave/unity/build/artifacts/iPhonePlayer-armv7-il2cppGenerated/UnityEngineDebug.cpp Line: 56)
    ExceptionOnReceive while connecting to: ns.exitgamescloud.com:5058. Check if the server is available.
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:LogWarning(Object)
    NetworkingPeer:OnStatusChanged(StatusCode)
    ExitGames.Client.Photon.<>c__DisplayClass6:<EnqueueStatusCallback>b__4()
    ExitGames.Client.Photon.MyAction:Invoke()
    ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    PhotonHandler:Update()

    (Filename: /Users/builduser/buildslave/unity/build/artifacts/iPhonePlayer-armv7-il2cppGenerated/UnityEngineDebug.cpp Line: 56)


    Any suggestions what should I do?
     
  15. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
    @Funny Face: Currently, PUN+ does not support 64 bit exports. We're on that. The library is prepared but we need to implement and test it in Unity exports. Give us 2..3 weeks or so.

    PUN Free should export fine (it's all Unity's work in that case) but I assume that's not an option.
     
  16. Funny-Face

    Funny-Face

    Joined:
    Nov 6, 2013
    Posts:
    17
    Thanks. 2-3 weeks is totally fine.
     
  17. thormond

    thormond

    Joined:
    May 11, 2013
    Posts:
    33
    Can PUN+ handle authoritative server architecture?
    Example: in uLink there's a checkbox to prevent players from sending RPCs to each other, you can also have Client scripts and Server scripts in one project and by opening the Unity editor on the project and it's copy you can pretty much test Client and Server without any building by launching their scenes via Play-mode. Debugging both layers with VS-C# debugger also works without any issues. API is pretty much the same as standard Unity Networking: networkViews and [RPC] attributes which expose RPCs to reflection

    How does that look in Photon nowadays? Last time I checked Photon's approach was having a Server layer that was pretty much disconnected from all the Unity interface and had to be developed separately
     
  18. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
    Photon did not change fundamentally and is still using a separate server, independent of Unity.
    You can implement an authoritative server with the Photon Server SDK but our solution is not done IN Unity. This has benefits but it won't run Unity scenes and physics due to that.
    If you want to use that, I think there are several viable options now to help you.

    Thanks for checking us out again :)
     
  19. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    What's the ETA on PUN+ for 64bit (and Unity 5)?
     
  20. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
    We confirmed Unity 4.6.3p2 exports well to iOS 64bit. Now I will do some more checks on other platforms and then update PUN+ accordingly. That will become PUN v1.51.

    Unity 5 changed some APIs and we need to adjust to that. This should not be a big deal.
    Related to iOS exports: If Unity 5 has the same IL2CPP version as 4.6.3p2, then it will export fine.

    I think PUN+ will get an update this week, unless there are unexpected extra-steps during submission or anything.
     
  21. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    590
    Is this still the case? I am designing a turn-based game where each player completes a level. Once all players have completed the level, the round of play is over. I'd like to use Unity for the level design, but need a solution/server to handle invites, scores, and completion. Photon's Turnbased SDK does not support doing that, even with Pro?
     
  22. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
    @Voronoi: Photon Turnbased is only needed for asynchronous games. If you don't need to save progress on the server, then you can use PUN. And PUN+ only adds support for mobile platforms in Unity Free and gives you a 100 CCU subscription for free on the Photon Cloud. It does not contain any other features than PUN Free.
     
  23. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
    PUN+ 1.51 is now available in the Asset Store!
    This has support for iOS 64bit but you have to use Unity 4.6.3p2 or newer for a successful build. Even 4.6.3p1 builds break on device, so please update! Sorry, but it's unclear if Unity 5.0.0.0 builds correctly for iOS 64bit with PUN+.

    The package has a few other fixes and updates. As far as I could see so far, it works nicely in Unity 5 now. Let us know if anything is odd.

    v1.51 (17. March 2015)
    Updated: PUN+ with a new native socket lib for iOS 32bit and 64bit. Please note: You need Unity 4.6.3p2 (or newer) to successfully export PUN+ to iOS! Before that "Patch 2" release, the new export did not work with PUN+.
    Fixed: PhotonAnimatorViewEditor for compatibility with Unity 5. Now Layers and Parameters can be configured as expected.
    Changed: A PhotonView that is created manually (by AddComponent()) will not attempt to register itself with PUN's internal list. Its viewID is 0. When you assign an ID to photonView.viewID, then it will register itself and can be found in PhotonView.Find(id). Make sure your IDs don't clash with IDs used in PhotonViews in the scene (1..999). Best, use PhotonView.AllocateViewID().
    Removed: A debug log in PhotonNetwork.networkingPeer.RegisterPhotonView(view) when you attempt to re-register a PhotonView and it's already in the list. This special case does not need logging.
    Updated: Several links to online docs, as the URLs changed. The basis is: http://doc.exitgames.com/en/pun
    Updated: Doc of PhotonNetwork.RaiseEvent. The EventCallback description here was wrong. In the callback you get the ID of the PhotonPlayer who raised the event. It might be 0 for "done on behalf of the room".
    Fixed: OnPhotonCreateRoomFailed gets the 2 extra parameters (return code and message) in all cases now.
    Added: Initial implementation of "CAS for Properties". This allows "Check And Swap" for SetCustomProperties. This should be a nice tool when any client can change a value and you want to make sure only one will succeed (can be picking up a item, making a kill, etc).
     
  24. Gunhi

    Gunhi

    Joined:
    Apr 18, 2012
    Posts:
    300
    I use Unity 4.6.3. PUN+ 1.5.1. Build for iOS IL2CPP. It runs well on Editor but failed to connect to Photon on real devices. Please double check.
     
  25. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
  26. Gunhi

    Gunhi

    Joined:
    Apr 18, 2012
    Posts:
    300
    I tried both PUN and PUN+ 1.5.1 in Unity 5.0.1f1.
    It is working on Editor but not on iOS:
    ==== here is the log ===

    MissingMethodException: Method not found: 'Default constructor not found...ctor() of ExitGames.Client.Photon.PingMono'.

    at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in <filename unknown>:0

    at System.Activator.CreateInstance (System.Type type) [0x00000] in <filename unknown>:0

    at PhotonPingManager+<PingSocket>c__Iterator1.MoveNext () [0x00000] in <filename unknown>:0

    UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator)

    UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)

    <PingAvailableRegionsCoroutine>c__Iterator0:MoveNext()

    UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator)

    UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)

    PhotonHandler:pingAvailableRegionsAndConnectToBest()

    NetworkingPeer:OnOperationResponse(OperationResponse)

    ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])

    ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()

    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()

    PhotonHandler:Update()

    JoinOrCreateRoom failed. Client is not on Master Server or not yet ready to call operations. Wait for callback: OnJoinedLobby or OnConnectedToMaster.
     
  27. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
    @Gunhi: Which export do you use? IL2CPP? Is code stripping enabled?
     
  28. Akusan

    Akusan

    Joined:
    Aug 24, 2014
    Posts:
    12
    Hi Tobiass,

    I have several concerns with PUN+:
    1.) How well does PUN+ work with Unity 5.0? What issues might I encounter if I use PUN+ on Unity 5.0?
    2.) How well does PUN+ work with Oculus Rift DK2? Is it possible to implement a multiplayer game with Unity + Photon (PUN+) + Oculus Rift DK2 with no (or at least tolerable) lag?
    3.) What's the limit of FPS characters i can use when using PUN+ without lag?

    Essentially I want to make a multiplayer game using Oculus Rift DK2 and standard FPS for other PC players without Oculus Rift and I am hoping that PUN+ will make this possible
     
  29. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    People is using it in u5 already.
    doubt dk2 has nothing do with the networking part.
    The limit of players is 99 and the lag will depend in the client connection and probably in how much you tune the game with the minimun possible data teansfer.

    Use pun free and whe you've it all tied and working upgrade. Thats the magic of this asset.
     
  30. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    A thing I never get it clear:. Can I buy two pun + licenses each for a diferent game project?
     
  31. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
  32. Bionicle_fanatic

    Bionicle_fanatic

    Joined:
    Jun 8, 2013
    Posts:
    368
    Hi PUN people o/

    I've got a little problem with an android multilpayer build. I bought PUN+ a while ago, and have only got 'round to using it in my latest game. I haven't yet implemented any of PUN's features yet, but I did install the package (minus the demos) into the project just to have it there and ready. However, when I built my game and ran it on my android device, it came up with the "unfortunately, #appname has stopped". I did a little testing, and found out the problem was with the Plugins folder that the PUN installation created. After I removed the folder, the app worked again.

    The folder seemed to contain a number of subfolders, each for a different platform (mac, pc, android, etc.). Should I remove all the subfolders except the Android one, or would that break PUN?

    Thanks in advance [:)]

    EDIT: Oh, and I'm using the latest version of PUN, and the latest version of Unity [;)] [:p]
     
  33. TayoHatch

    TayoHatch

    Joined:
    Sep 25, 2014
    Posts:
    2
    Does being in the lobby, but not in a room count as being a concurrent user? If so, how can you access the amount of users on your game. I want to be able to display the amount of concurrent users there are.
     
  34. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
    This sounds a bit like an issue in Unity.
    Usually, those plugin folders should not affect your game at all. Of course the Android lib should work and the others should not be in the build. Maybe Unity has some regression there. Are you using Unity 5? If so, you could try out the patch releases. Per lib (.dll, .a and .so files), you can use the inspector to define the platform that they export to. Maybe you check what's set there. This part should be setup by Unity 5's import but maybe something is not working as expected.
    If you use Unity 5, you could also switch to the PUN Free assets and libs. Of course you still can apply the 100 CCU subscription despite using PUN Free.
     
  35. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
    Any client that is connected counts as concurrent connection.
    While on the Master Server (no matter if you are in a lobby or not), we send statistic values about the count of rooms and players in and outside of room. Check PhotonNetwork.countOfPlayersOnMaster and .countOfPlayersInRooms.
     
  36. BillO

    BillO

    Joined:
    Sep 26, 2010
    Posts:
    61
    I'm having a problem with the initial location of players when joining a game. When the second player enters the game, if the first player has moved from their initial location then the second player sees the first player fly in from off screen. Probably the origin of the scene? Is this a common problem? Should I lock all player movement until everyone has joined the game? Besides this is problem, it appears everything else works fine.
     
  37. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
    @BillO: This is a common problem but can be solved. PUN always creates the GameObjects at the place defined by Instantiate. The first update from that GO will tell your client where the GameObject is now. Most likely, the logic to move the GameObject will interpolate the initial position to the current one in several steps and things begin to "fly in".
    To avoid this, you can apply the very first position update "as is" and skip interpolation. This teleports the GameObject to the last position as if it got created there (if it was off-screen before).
    The physics engine might interpret this sudden move as being very fast. If that's a problem and triggers animations or such, you need to take care of that effect, too.
     
  38. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
    I just updated PUN+ to v1.52 with lots of fixes and some new features, too.
    The list of changes is too long for this post but they are listed in the changelog.txt.

    Some highlights:
    WebGL support. This is still in the works and depends a lot on the improvements done in Unity but it exports and runs fine in Firefox.
    Fixed iOS 64bit PhotonNetwork.time. Use the latest Unity patch releases for best IL2CPP export results.
    Server Side Master Client. Anyone can now become the Master Client and the server will keep track.
    Hopefully no more freezing in the Editor due to changes in the socket-using classes.
    OnPhotonJoinRoomFailed callback now always gets the reason.
    Optional caching for MonoBehaviours with RPCs.

    And lots of other stuff. Hope you enjoy!
     
  39. Bionicle_fanatic

    Bionicle_fanatic

    Joined:
    Jun 8, 2013
    Posts:
    368
    For anyone who has a similar problem, I managed to fix the android Unexpectedly Quit problem by changing the CPU to Any CPU under Plugins/Android/libPhotonSocketPlugin. Just putting it out there [;)]
     
    tobiass and hopeful like this.
  40. BillO

    BillO

    Joined:
    Sep 26, 2010
    Posts:
    61
    tobiass -- Thanks for the reply. However, I'm having trouble finding any documentation explaining how to apply the very first position update "as is" and skip interpolation. Any references to this solution online would be appreciated.
     
  41. BillO

    BillO

    Joined:
    Sep 26, 2010
    Posts:
    61
    tobiass -- This is what I came up with and it seems to work:

    private void SyncedMovement()
    {
    syncTime += Time.deltaTime;
    if (syncTime <= 2f)
    {
    vehicle.rigidbody.position = syncEndPosition;
    vehicle.rigidbody.rotation = syncEndRotation;
    vehicle.rigidbody.velocity = syncEndVelocity;
    }
    else
    {
    vehicle.rigidbody.position = Vector3.Lerp (syncStartPosition, syncEndPosition, syncTime / syncDelay);
    vehicle.rigidbody.rotation = Quaternion.Slerp (syncStartRotation, syncEndRotation, syncTime / syncDelay);
    vehicle.rigidbody.velocity = Vector3.Lerp (syncStartVelocity, syncEndVelocity, syncTime / syncDelay);
    }
    }

    Please let me know if there is a better method.

    Thank you!
     
  42. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    I have not upgraded my PUN version yet to the Latest PUN v1.52 as released on the Asset Store with WebGL Support. I have been using an earlier version of the PUN WebGL Package v1.50.2806.

    Currently if I build a standalone client with Websockets my game's performance is good, network sync is working great. If I build a WebGL client and load 2 or more players into the game, I notice some major sync delays up to about 5 seconds or more. I don't see any errors in the browser console, or exceptions thrown (w/ full exceptions enabled). What could possibly cause such a network sync delay? We are talking about player, enemy ai movement delay, along with almost any action performed such as attack, damage, death, projectile instantiating etc... everything is delayed by 5 seconds of more via WebGL build. Any ideas?

    Again, I am not using latest version of PUN v1.52, so i'm curious if upgrading will resolve any WebGL network sync related issues possibly. Please advise. Thanks!
     
  43. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
    @BillO: That should work but it's time-dependent. It would possibly be better if you have a bool "appliedFirstUpdate". Update() can check if your syncEndPosition is Vector3.zero. While it is, do not move. When the first update arrives, OnPhotonSerializeView() will grab the values from the stream and then, finally, Upate() can apply them. If appliedFirstUpdate is false, set the position (don't lerp) and set appliedFirstUpdate = true. If appliedFirstUpdate is true, you can lerp to the next position updates easily.

    @Kuroato: I can't really say what's causing this lag. It might be a performance issue. Websockets are reliable and ordered. Everything you send gets applied. If the others send enough, an overloaded client might lag behind, still working on slightly older messages. Also, if loss happens, WebSockets will fix that and this takes time.
    Please post some more details about your game in our forum. Or post a repro case for us.
    http://forum.exitgames.com/
     
  44. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    Thanks Tobiass, will do if we can't figure it out. I'll let you know, it's just weird because Standalone Client Works OK, but WebGL does not... so wondering if there is something we are missing with the WebGL Photon setup.
     
  45. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    323
    Looking at your website and using your calculator of players vs msg/s (per room) for the game I have in mind (32 player) and 4 msgs/s I would need at least 4,096 msgs/s (per room). Do you offer a solution that fits that? I'm trying to find something that simplifies the multiplayer aspect, fits my needs, but doesn't break the bank.
     
  46. Akusan

    Akusan

    Joined:
    Aug 24, 2014
    Posts:
    12
    Tobias, is there FPS demos and tutorials anywhere? I see mostly 3rd person.

    I am really liking PUN+ so far. I am still learning a lot.
     
  47. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    after upgrading my project from PUN WebGL Package to PUN v1.52 we are now unable to build for WebGL! It was working fine before we updated, now WebGL builds are broken.

    Code (csharp):
    1. Failed running C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "C:\Users\MijiKai\Unity Projects\ApocalypseCity_u5.0\UnityProjects\_github\ApocalypseCity\Temp\StagingArea\Data\Managed" -l none -c link -x "C:\Program Files\Unity\Editor\Data\Tools\native_link.xml" -f "C:\Program Files\Unity\Editor\Data\il2cpp\LinkerDescriptors" -x "C:\Users\MijiKai\Unity Projects\ApocalypseCity_u5.0\UnityProjects\_github\ApocalypseCity/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "C:\Users\MijiKai\Unity Projects\ApocalypseCity_u5.0\UnityProjects\_github\ApocalypseCity\Assets\Idnet\Best HTTP (Pro)\link.xml" -d "C:\Users\MijiKai\Unity Projects\ApocalypseCity_u5.0\UnityProjects\_github\ApocalypseCity\Temp\StagingArea\Data\Managed" -a  "C:\Users\MijiKai\Unity Projects\ApocalypseCity_u5.0\UnityProjects\_github\ApocalypseCity\Temp\StagingArea\Data\Managed\Assembly-CSharp-firstpass.dll" -a  "C:\Users\MijiKai\Unity Projects\ApocalypseCity_u5.0\UnityProjects\_github\ApocalypseCity\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll" -a  "C:\Users\MijiKai\Unity Projects\ApocalypseCity_u5.0\UnityProjects\_github\ApocalypseCity\Temp\StagingArea\Data\Managed\Assembly-UnityScript-firstpass.dll" -a  "C:\Users\MijiKai\Unity Projects\ApocalypseCity_u5.0\UnityProjects\_github\ApocalypseCity\Temp\StagingArea\Data\Managed\Assembly-UnityScript.dll" -a  "C:\Users\MijiKai\Unity Projects\ApocalypseCity_u5.0\UnityProjects\_github\ApocalypseCity\Temp\StagingArea\Data\Managed\UnityEngine.UI.dll" -a  "C:\Users\MijiKai\Unity Projects\ApocalypseCity_u5.0\UnityProjects\_github\ApocalypseCity\Temp\StagingArea\Data\Managed\Photon3Unity3D.dll" -a  "C:\Users\MijiKai\Unity Projects\ApocalypseCity_u5.0\UnityProjects\_github\ApocalypseCity\Temp\StagingArea\Data\Managed\TcpClientImplementation 1.dll"
    2. stdout:
    3. Fatal error in Mono CIL Linker
    4. Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'TcpClientImplementation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
    5.   at Mono.Linker.LinkContext.Resolve (IMetadataScope scope) [0x00000] in <filename unknown>:0
    6.   at Mono.Linker.Steps.ResolveFromXmlStep.ProcessReferences (Mono.Cecil.AssemblyDefinition assembly, Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    7.   at Mono.Linker.Steps.ResolveFromXmlStep.GetAssembly (Mono.Linker.LinkContext context, System.String assemblyName) [0x00000] in <filename unknown>:0
    8.   at Mono.Linker.Steps.ResolveFromXmlStep.ProcessAssemblies (Mono.Linker.LinkContext context, System.Xml.XPath.XPathNodeIterator iterator) [0x00000] in <filename unknown>:0
    9.   at Mono.Linker.Steps.ResolveFromXmlStep.Process () [0x00000] in <filename unknown>:0
    10.   at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    11.   at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    12.   at Mono.Linker.Driver.Run () [0x00000] in <filename unknown>:0
    13.   at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver) [0x00000] in <filename unknown>:0
    14. stderr:
    15. UnityEngine.Debug:LogError(Object)
    16. UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:66)
    17. UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:192)
    18. UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:185)
    19. UnityEditorInternal.AssemblyStripper:Strip(String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:136)
    20. UnityEditorInternal.AssemblyStripper:Strip(String[], String[], String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:121)
    21. UnityEditorInternal.IL2CPPBuilder:RunAssemblyStripper(IEnumerable, String, String[], String[], String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:452)
    22. UnityEditorInternal.IL2CPPBuilder:StripAssemblies(String[], String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:440)
    23. UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:273)
    24. UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:218)
    25. UnityEditor.HostView:OnGUI()

    Code (csharp):
    1. Exception: C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe did not run properly!
    2. UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:68)
    3. UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (IEnumerable`1 args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:192)
    4. UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String linkerPath, System.String descriptorsFolder, IEnumerable`1 additionalBlacklist) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:185)
    5. UnityEditorInternal.AssemblyStripper.Strip (System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String monoLinkerPath, System.String descriptorsFolder, IEnumerable`1 additionalBlacklist) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:136)
    6. UnityEditorInternal.AssemblyStripper.Strip (System.String[] assemblies, System.String[] searchDirs, System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String monoLinkerPath, System.String descriptorsFolder, IEnumerable`1 additionalBlacklist) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:121)
    7. UnityEditorInternal.IL2CPPBuilder.RunAssemblyStripper (IEnumerable assemblies, System.String managedAssemblyFolderPath, System.String[] assembliesToStrip, System.String[] searchDirs, System.String monoLinkerPath) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:452)
    8. UnityEditorInternal.IL2CPPBuilder.StripAssemblies (System.String[] assemblies, System.String managedAssemblyFolderPath) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:440)
    9. UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:273)
    10. UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:218)
    11. UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
    12. UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)
    13. UnityEditor.HostView:OnGUI()
    14.  
    15.  
    16. Error building Player: Exception: C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe did not run properly!
     
  48. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
    Good to read you like PUN so far :)
    There is a complete solution for first person shooters: UFPS Photon Multiplayer Starter Kit
    I assume there is still enough to do, even if you used this but UFPS should have more fitting samples than we have for PUN.
     
  49. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
    @Kuroato: Did you setup the .dll and .jslib export settings in the Editor / Inspector? I know those are not accurate.
    You also have access to the WebGL Early Access group. You could post those topics there.
     
  50. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
    I updated PUN+ along with PUN. The main reason is a fix for Photon v3.x servers, if you don't use the Photon Cloud.

    v1.53 (28. May 2015)
    Fixed: Master Client selection for non-cloud servers (was broken in v1.52 only). If the new features are not present on the server, we now use the old client-side workflow. Photon OnPremise is still v3.x and the "Server Side Master Client" feature requires Photon v4. The public cloud servers support this feature already.
    Fixed: NullreferenceException in extension method StripToStringKeys(). Extension-methods could be called on objects that are null.
    Changed: PhotonPlayer.Find() now re-uses a method that implements finding a player in an effective way.
    Changed: SetCustomProperties(propertiesToSet, expectedValues) now requires expectedValues and will not send anything if those are null or empty. Use SetCustomProperties(propertiesToSet) if you don't have props to check.
    Changed: Internally used operation GetRegions will now log a warning if the AppId wasn't set. Then the client doesn't get a list of regions.
    Fixed: An issue with TCP clients which would fail to connect again, after a disconnect. As before, you should use UDP as default, so most likely you were not affected. Fixed in the Photon3Unity3d.dll.