Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. 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. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    Hello, I purchased PUN+ for 100CCU limit an I am using Unity 5. I am going to build for windows phone, ios, android. Should I import PUN or PUN+, as I have Unity5 it sounds like PUN+ doesn't have other advantages.

    Is it possible for people on different platforms to play together with joining the same lobby and room?

    Thanks.
     
  2. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    I've tested android and desktop at the same time and they do work ok showing the clients on the pc in teh phone and viceversa.
     
  3. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    PUN players can play cross platform but it's also possible to separate them easily (if needed for legal reasons per platform).
    Unity 5 technically doesn't need the PUN+ native plugins anymore. The Unity "Free" license now includes C# socket usage on mobile. Of course, the subscription in PUN+ is still (hopefully) worth buying it but the files are not required for Unity 5.
     
  4. VoLkizz

    VoLkizz

    Joined:
    Mar 29, 2014
    Posts:
    40
  5. superluigi

    superluigi

    Joined:
    Feb 6, 2013
    Posts:
    38
    Looking for advice. How do most of you handle room joining and game starting? This is my first attempt at this and the way I'm handling it is: from the main menu(offline) you choose to play online. This connects you to the server and you are now in the online lobby (plus onjoinedlobby() gets called by pun) where you have create room, join room by name, join random room, etc. When you create or join a room you actually create or join a room in the pun server. However when you do I want players to hang out there and until they all hit a button to indicate theybare ready to start and until there are at least 4 players. When that happens they will then go to a new in game lobby (not puns lobby) where they will choose blue or red team. Then when they're ready the game will start. So my question is how do I execute the two final steps. Do I have to create a new room in pun, give it null as name, and then have all 4 players join that unique name to transition to the new room? I ask because in the demos you join room but once you do you are already playing. So say in the viking demo after you join a room and are in the snowy hills walking around, if you had to walk to a tree to join blue team and to a different tree next to it to join red team and from there you loaded and started the actual game, how would you do that exactly?
     
  6. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    @superluigi: If you want to start your game only when X players are matched, you can still use one room. I would use JoinRandomRoom() and if that fails, create a room with a fitting max players value. Any client who is in the room first checks the number of players: If they are below X, show a "wait screen" or whatever you like.

    The Master Client could check the number of players and when it's 4, set a room property "playing" to true.

    So, you don't have to play right away, just because you're in a room. Make up your own states and wait until the players are ready or at least until there are enough of them.
     
  7. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    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 on the first post and in the package.

    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!
     
  8. Calclavia

    Calclavia

    Joined:
    Jul 13, 2013
    Posts:
    2
    I updated to the latest PUN v1.52, tried compiling but crashes when exporting to WebGL. It seems like it's caused by Web Sockets.

    Error:
    Code (csharp):
    1.  
    2. Failed running C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "E:\Document\Computer-Science\Unity3D\Artillects\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 "E:\Document\Computer-Science\Unity3D\Artillects/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -d "E:\Document\Computer-Science\Unity3D\Artillects\Temp\StagingArea\Data\Managed" -a  "E:\Document\Computer-Science\Unity3D\Artillects\Temp\StagingArea\Data\Managed\Assembly-CSharp-firstpass.dll" -a  "E:\Document\Computer-Science\Unity3D\Artillects\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll" -a  "E:\Document\Computer-Science\Unity3D\Artillects\Temp\StagingArea\Data\Managed\UnityEngine.UI.dll" -a  "E:\Document\Computer-Science\Unity3D\Artillects\Temp\StagingArea\Data\Managed\Parse.Unity.dll" -a  "E:\Document\Computer-Science\Unity3D\Artillects\Temp\StagingArea\Data\Managed\Mad2D.dll" -a  "E:\Document\Computer-Science\Unity3D\Artillects\Temp\StagingArea\Data\Managed\MadCommons.dll" -a  "E:\Document\Computer-Science\Unity3D\Artillects\Temp\StagingArea\Data\Managed\Photon3Unity3D.dll" -a  "E:\Document\Computer-Science\Unity3D\Artillects\Temp\StagingArea\Data\Managed\websocket-sharp.dll"
    3.  
    4. stdout:
    5. Fatal error in Mono CIL Linker
    6. System.Exception: Error processing method: 'System.Void WebSocketSharp.Net.HttpListenerAsyncResult::complete(WebSocketSharp.Net.HttpListenerAsyncResult)' in assembly: 'websocket-sharp.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Boolean System.Threading.ThreadPool::UnsafeQueueUserWorkItem(System.Threading.WaitCallback,System.Object)
    7.   at Mono.Linker.Steps.MarkStep.MarkMethod (Mono.Cecil.MethodReference reference) [0x00000] in <filename unknown>:0
    8.   at Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction) [0x00000] in <filename unknown>:0
    9.   at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x00000] in <filename unknown>:0
    10.   at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00000] in <filename unknown>:0
    11.   at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0
    12.   --- End of inner exception stack trace ---
    13.   at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0
    14.   at Mono.Linker.Steps.MarkStep.Process () [0x00000] in <filename unknown>:0
    15.   at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    16.   at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    17.   at Mono.Linker.Driver.Run () [0x00000] in <filename unknown>:0
    18.   at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver) [0x00000] in <filename unknown>:0
    19. stderr:
    20.  
    21. UnityEngine.Debug:LogError(Object)
    22. UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:66)
    23. UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:192)
    24. UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:185)
    25. UnityEditorInternal.AssemblyStripper:Strip(String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:136)
    26. 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)
    27. UnityEditorInternal.IL2CPPBuilder:RunAssemblyStripper(IEnumerable, String, String[], String[], String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:445)
    28. UnityEditorInternal.IL2CPPBuilder:StripAssemblies(String[], String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:433)
    29. UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:273)
    30. UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:218)
    31. UnityEditor.HostView:OnGUI()
    32.  
    33.  
    Code (csharp):
    1.  
    2. Exception: C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe did not run properly!
    3. 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)
    4. 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)
    5. 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)
    6. 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)
    7. 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)
    8. 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:445)
    9. UnityEditorInternal.IL2CPPBuilder.StripAssemblies (System.String[] assemblies, System.String managedAssemblyFolderPath) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:433)
    10. UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:273)
    11. 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)
    12. UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
    13. 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)
    14. UnityEditor.HostView:OnGUI()
    15.  
     
  9. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    @Calclavia: At the moment, we submitted PUN as Unity 4.3 project and that means it doesn't have the meta information about .dlls like Unity 5 has. You might have to set the exports per library in Unity inspector.
    Update: Find the websocket-sharp.dll in \Assets\Plugins\WebSocket\ and edit it's platforms. In the actual browser, a jslib is used, so assign only Editor and Standalone to the websocket-sharp.dll.

    Also, update to the latest Unity patch version before attempting WebGL exports. There are always a lot of fixes in those.
     
    Last edited: May 22, 2015
  10. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Hi, we're about to start using Photon and we need to know:

    is it possible to use a pooling plugin with Photon so everything isn't Instantiated at runtime every time we need new network objects to spawn? If so, how and where do we put code to tell Photon to use the pooling plugin (such as our Pool Boss plugin).

    I may have asked this question a few months ago but I never saw an answer so I'm asking again :)

    We have the paid Photon (PUN+?) so I apologize if this isn't the correct thread. Still need an answer though.
     
  11. Calclavia

    Calclavia

    Joined:
    Jul 13, 2013
    Posts:
    2
    Thanks! That seems to have allowed it to compile!
     
  12. Paradoks

    Paradoks

    Joined:
    Oct 13, 2009
    Posts:
    436
    Hi Tobiass,

    I am running the latest version of pun and unity.

    And i got this error:

    Code (CSharp):
    1.  
    2.  
    3. Win32Exception: ApplicationName='"C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe"', CommandLine='"C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc" -Oz -s NO_EXIT_RUNTIME=1 -o "C:/Documents and Settings/USER/Bureau/MyFiles/ProjetsUnity/Game/Assets/../Temp/StagingArea/Data\Native\UserAssembly.bc" @"C:\DOCUME~1
    4. Assets/../Temp/EmscriptenWork'
    5. System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
    6. System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
    7. System.Diagnostics.Process.Start ()
    8. (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
    9. UnityEditor.Utils.Program.Start () (at C:/buildslave/unity/build/Editor/Mono/Utils/Program.cs:33)
    10. NativeCompiler.RunProgram (System.Diagnostics.ProcessStartInfo startInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:42)
    11. NativeCompiler.Execute (System.String arguments, System.String compilerPath) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/NativeCompiler.cs:26)
    12. UnityEditor.WebGL.Il2Cpp.EmscriptenCompiler.LinkObjects (IEnumerable`1 sources, System.String outfile)
    13. UnityEditor.WebGL.Il2Cpp.EmscriptenCompiler.MultiThreadedCompile (System.String outfile, IEnumerable`1 sources, IEnumerable`1 includePaths, Boolean exceptionSupport)
    14. UnityEditor.WebGL.Il2Cpp.EmscriptenCompiler.CompileDynamicLibrary (System.String outFile, IEnumerable`1 sources, IEnumerable`1 includePaths, IEnumerable`1 libraries, IEnumerable`1 libraryPaths)
    15. UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:290)
    16. 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)
    17. UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
    18. 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)
    19. UnityEditor.HostView:OnGUI()
    20.  
    21.  
    22. Error building Player: Win32Exception: ApplicationName='"C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe"', CommandLine='"C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc" -Oz -s NO_EXIT_RUNTIME=1 -o "C:/Documents and Settings/USER/Bureau/MyFiles/ProjetsUnity/Game/Assets/../Temp/StagingArea/Data\Native\UserAssembly.bc" @"C:\DOCUME~1\USER\LOCALS~1\Temp\tmp315bab48.tmp"', CurrentDirectory='C:/Documents and Settings/USER/Bureau/MyFiles/ProjetsUnity/Game/Assets/../Temp/EmscriptenWork'
    23.  
    24.  
    25.  
    any hint ?
     
    Last edited: May 24, 2015
  13. Kinukin

    Kinukin

    Joined:
    Feb 8, 2013
    Posts:
    18
    How would I create 1 server using the Photon Cloud? I don't want any of the players to create their own rooms.

    If anyone could help me, it would be awesome.

    Thanks
     
  14. superluigi

    superluigi

    Joined:
    Feb 6, 2013
    Posts:
    38
    I have an interesting question. How would you guys go about creating and traveling as a party with another player. I created an option to "team up". From there you join a new 2v2 lobby where only the 2v2 team rooms are playable and I'll add the option partner up with a friend. However, at the moment I'm having trouble figuring out how would I partner up with a friend and then join a room against another enemy couple. More specifically, how would we be locked to travel together to a room? I could probably figure a solution out on my own if I knew how to do the whole friends thing, but the problem is I can't find anything helpful in the api. All I find are ways to get a friends list, to check their status, etc. How do you actually sens a friend request, accept a friend request, save this lit of friends, etc?
     
    Last edited: May 25, 2015
  15. superluigi

    superluigi

    Joined:
    Feb 6, 2013
    Posts:
    38
    @Kinukin When you connect, everyone in your game is in the same server. You can just make everyone join the same room.name when they start playing.
    So say you download the free photon unity networking asset from the asset store. You use ConnectUsingSettings("whatever name you decide to use"); this will separate everyone into the same server. Does that answer your question? I'm not sure I'm understanding exactly what your asking.
     
    tobiass likes this.
  16. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    This is not supported out of the box but PUN should be open enough to support this, by modding the source.
    Also, our Instantiate messages are just buffered events. You can use those in your own way and even implement your own instantiation system (even one which uses PhotonViews).
     
  17. Kinukin

    Kinukin

    Joined:
    Feb 8, 2013
    Posts:
    18
    I just noticed that everyone joins the same room, which is what I want.

    But, is it possible to hack in PUN? I don't want any hackers!

    Thanks
     
  18. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    @Paradoks: See a few posts above. I hope that helps. I can't reproduce the issue, atm.

    @Kinukin: You can't just use one room. With enough players, it will become unplayable due to all the updates. So you always need more than one room. It's up to you, if that is visible or not. Hacking is always possible, yes. The server is not authoritative, unless you adjust it to your game.

    @superluigi: There is no support for groups of players switching a room. Leepo solved this somehow for Verdun, but I don't know the details. You could use Photon Chat to have a communication independent from rooms, so anyone who joins another can inform the comrades and enable them to follow. Set Room.visible = false while teams try to join, so random matchmaking is off in that time but comrades can join by room name.
     
    Last edited: May 26, 2015
  19. Kinukin

    Kinukin

    Joined:
    Feb 8, 2013
    Posts:
    18
    Is it possible to buy a subscription to host that amount of players in 1 room?

    By the way, the Photon Server. Is it different to the Photon cloud? Would you have to create your own scripts to run off the Photon Server?

    I want to use the same scripting as the Photon Cloud within the Photon Server, but I have seem some tutorials for the Photon Server but the scripting seems complex. I like the Photon Cloud, as it's easy to script.

    Thanks
     
  20. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    @Kinukin: The "Room" concept doesn't work well for large numbers of players, so you it's not a question of buying some license. Technically, it's very hard to put all your players in one room.
    The Photon Server has the same logic as the Photon Cloud to start with but you can modify that. You can build your own logic server-side with it but you have to host the server, too. It's more complicated, because you need to optimize things for more users than in the Unity client.
    To help you better, please start a new thread in our forum and explain what you want to achieve. This topic is better for quick answers.
    http://forum.exitgames.com/
     
  21. Paradoks

    Paradoks

    Joined:
    Oct 13, 2009
    Posts:
    436
    @tobiass
    i did the "assign only Editor and Standalone to the websocket-sharp.dll." thing."
    It dont work neighter.
     
  22. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    A new update to PUN. The main reason is a fix for Master Client selection on v3 Photon Servers (if you don't use the Photon Cloud). There are a few other updates in, too.

    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.
     
  23. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    @Paradoks: I need to know the exact version of Unity, which we need to check. When we tested, it worked well.
    If you are in the PUN WebGL Early Access group, post there, please. This topic is too complex to follow in this thread. Thanks.
     
  24. NeilBostian

    NeilBostian

    Joined:
    Apr 11, 2014
    Posts:
    2
    My team has been working on an object pooling system to supplement PUN, allowing for use of all photon features with the added benefits of object pooling optimization. It's very much possible but requires a fair amount of work.

    If you're interested in making your own, I'd recommend looking into the source for PhotonNetwork.Instantiate, and checking out this link http://doc-api.exitgames.com/en/pun/current/pun/doc/general.html#instantiateManual, as you will need to write your own instantiate function that allocates view IDs and passes them over the network. This is the code in PhotonNetwork.Instantiate

    Code (csharp):
    1.  
    2.         Component[] views = (Component[])prefabGo.GetPhotonViewsInChildren();
    3.         int[] viewIDs = new int[views.Length];
    4.         for (int i = 0; i < viewIDs.Length; i++)
    5.         {
    6.             //Debug.Log("Instantiate prefabName: " + prefabName + " player.ID: " + player.ID);
    7.             viewIDs[i] = AllocateViewID(player.ID);
    8.         }
    9.  
    As far as I've seen, there are not currently any plugins that support object pooling over photon. This is something my team really wanted for our current project, and we're hoping we can make our technology available to the community in the next week or two if you don't have your own solution in that time.
     
    tobiass likes this.
  25. XCO

    XCO

    Joined:
    Nov 17, 2012
    Posts:
    379
    Hello :D

    May I ask does this support Playmaker or plans to support it ? TY
     
  26. superluigi

    superluigi

    Joined:
    Feb 6, 2013
    Posts:
    38
    Hello Photon. Currently I'm trying to help someone in the exit games forums with a problem I had a while back but I haven't been able to replicate the solution. He can't get Photon to work with UnityScript. I told him that he needs the plug ins folder in the root of his project. Easier said than done. I started a new project and immediately upon importing photon I get errors. I try moving things I get more errors. I delete things I get errors. I delete EVERYTHING and I get rid of the errors, and while that feels great, I still want to use photon. I actually wanted to try to make a step by step tutorial video on how to set up everything for UnityScript compatibility for anyone who comes across the same problem in the future, but I'm probably not the guy for the job seeing as I need more help than anyone. I did all the same stuff I did the first time, but this time it didn't work. I get this error often: The imported type `ExitGames.Client.Photon.IPhotonPeerListener' is defined multiple times. It's not always IPhotonPeelListener, this is just one example. However, it is usually that whole is defined multiple times thing. I think this has to do with having multiple scripts that work together. the only reason I say this is because when I delete the problem script i get the exact same error but on another script.

    EDIT: So I kind of found a solution. Originally I wouldn't import the demos folder (and I believe I was not importing the ultility folder either) and I think that was causing problems. For one there was no resources folder, I don't know if maybe a resources folder gets created when I import everything or something, but anyways this seems to have solved a lot of my problems. I also have zero errors at the moment.
     
    Last edited: Jun 1, 2015
  27. robertsze

    robertsze

    Joined:
    Jul 8, 2013
    Posts:
    83
    Hi guys,



    With the last update of photon we can not build for iOS anymore:



    Failed running /Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "/Users/user/Documents/Projects/Project5/Temp/StagingArea/Data/Managed" -l none -c link -x "/Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper/native_link.xml" -f "/Applications/Unity/Unity.app/Contents/Frameworks/il2cpp/LinkerDescriptors" -x "/Users/user/Documents/Projects/Project5/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Users/user/Documents/Projects/Project5/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "/Users/user/Documents/Projects/Project5/Assets/link.xml" -d "/Users/user/Documents/Projects/Project5/Temp/StagingArea/Data/Managed" -a "/Users/user/Documents/Projects/Project5/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" -a "/Users/user/Documents/Projects/Project5/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a "/Users/user/Documents/Projects/Project5/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" -a "/Users/user/Documents/Projects/Project5/Temp/StagingArea/Data/Managed/GPGSUtils.dll" -a "/Users/user/Documents/Projects/Project5/Temp/StagingArea/Data/Managed/P31RestKit.dll" -a "/Users/user/Documents/Projects/Project5/Temp/StagingArea/Data/Managed/Photon3Unity3D.dll" -a "/Users/user/Documents/Projects/Project5/Temp/StagingArea/Data/Managed/Vectrosity.dll" -a "/Users/user/Documents/Projects/Project5/Temp/StagingArea/Data/Managed/UnityEngine.Cloud.Analytics.dll" -a "/Users/user/Documents/Projects/Project5/Temp/StagingArea/Data/Managed/websocket-sharp.dll" -a "/Users/user/Documents/Projects/Project5/Temp/StagingArea/Data/Managed/TypingEffect.dll"





    Exception: /Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe did not run properly!

    UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:68)

    UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (IEnumerable`1 args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:192)

    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 /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:185)

    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 /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:136)

    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 /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:121)

    UnityEditorInternal.IL2CPPBuilder.RunAssemblyStripper (IEnumerable assemblies, System.String managedAssemblyFolderPath, System.String[] assembliesToStrip, System.String[] searchDirs, System.String monoLinkerPath) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:463)

    UnityEditorInternal.IL2CPPBuilder.StripAssemblies (System.String[] assemblies, System.String managedAssemblyFolderPath) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:451)

    UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:279)

    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)

    UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.iOSBuildPostprocessor pp, BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String stagingAreaDataManaged, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)

    UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (BuildPostProcessArgs args)

    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 /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)

    UnityEditor.HostView:OnGUI()



    Error building Player: Exception: /Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe did not run properly!



    Any idea whats going wrong? (Disabling WebSocket for iOS builds didn't work as code references it)
     
  28. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    Which version of Unity do you use? Which version of PUN?

    If you use 5.x, you might have to set the platforms for the websocket-sharp.dll. Set it up to be used only in Editor.
    That's a problem that we didn't see before. We upload with 4.x and that can't define where dlls go.
    We will find a fix. Most likely, we will provide 4.x and 5.x packages in the store.
     
  29. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    XCO likes this.
  30. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    Thanks for the update.
    You get those errors when some class exists more than once in your project. Unlike assets, which can have the same name when they are in different folders, code will clash more often (there are namespaces to avoid this).
    I assume you copied some files instead of moving them.
    Thanks for trying to create a tutorial for that. If you get it running now, you could try again :)
     
  31. robertsze

    robertsze

    Joined:
    Jul 8, 2013
    Posts:
    83
    Unfortunately this does not work. Setting it to Editor only will exclude it from the build but WebSocket.cs depends on the Dll, so we get:

    Assets/Plugins/WebSocket/WebSocket.cs(108,9): error CS0246: The type or namespace name `WebSocketSharp' could not be found. Are you missing a using directive or an assembly reference?

    Unity version 5.0.2p2, latest PUN version available on the Asset Store.
     
  32. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    The WebSocket.cs needs to be ignored for iOS, too. I will come up with fitting compile conditions.
    I will use Unity 5.0.2p3 for that.
     
  33. Aistina

    Aistina

    Joined:
    Nov 20, 2012
    Posts:
    3
    FYI, we have the same problem building for iOS IL2CPP on Unity 4.6.5p4.

    Code (CSharp):
    1. Failed running /Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed" -l none -c link -x "/Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper/native_link.xml" -f "/Applications/Unity/Unity.app/Contents/Frameworks/il2cpp/LinkerDescriptors" -x "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Assets/link.xml" -d "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed" -a  "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" -a  "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a  "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/Assembly-UnityScript-firstpass.dll" -a  "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" -a  "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/FM.dll" -a  "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/FM.WebSync.dll" -a  "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/JsonNetUnity.IOS.dll" -a  "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/LitJson.dll" -a  "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/SteamworksManaged.dll" -a  "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/Xceed.Compression.dll" -a  "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/Xceed.FileSystem.dll" -a  "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/ICSharpCode.SharpZipLib.dll" -a  "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/P31RestKit.dll" -a  "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/Photon3Unity3D.dll" -a  "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/TcpClientImplementation.dll" -a  "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/unibill.dll" -a  "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/NDesk.Options.dll" -a  "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/websocket-sharp.dll" -a  "/Users/maarten/Documents/Unity/MidcoreNewTrunk/Temp/StagingArea/Data/Managed/uScriptRuntime.dll"
    2.  
    3. stdout;
    4. Fatal error in Mono CIL Linker
    5. System.Exception: Error processing method: 'System.Void WebSocketSharp.Net.HttpListenerAsyncResult::complete(WebSocketSharp.Net.HttpListenerAsyncResult)' in assembly: 'websocket-sharp.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Boolean System.Threading.ThreadPool::UnsafeQueueUserWorkItem(System.Threading.WaitCallback,System.Object)
    6.   at Mono.Linker.Steps.MarkStep.MarkMethod (Mono.Cecil.MethodReference reference) [0x00000] in <filename unknown>:0
    7.   at Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction) [0x00000] in <filename unknown>:0
    8.   at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x00000] in <filename unknown>:0
    9.   at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00000] in <filename unknown>:0
    10.   at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0
    11.   --- End of inner exception stack trace ---
    12.   at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0
    13.   at Mono.Linker.Steps.MarkStep.Process () [0x00000] in <filename unknown>:0
    14.   at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    15.   at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    16.   at Mono.Linker.Driver.Run () [0x00000] in <filename unknown>:0
    17.   at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver) [0x00000] in <filename unknown>:0
    18. stderr:
     
  34. claytoncurmi

    claytoncurmi

    Joined:
    Jul 6, 2010
    Posts:
    168
    Hi all,

    I've been trying to set up Photon with Facebook authentication and so far the code just works. I'm populating an array with the player friends IDs which I'm passing to the FindFriends method. I'm calling this method when the player is in the lobby (not in a room) on the master server. The OnUpdatedFriendList method gets called as expected and I can go through the list of friends, however when two players are online, their status is not being updated (i.e. they both see each other as offline). Is there a flag that I need to set when successfully joining the lobby to notify the server (I presume this is automatically done by PUN). Can anyone shed some light on this please?

    Code (csharp):
    1. IEnumerator FindFriendsCoroutine ()    {
    2.         if (friendsDict.Count == 0) {
    3.             yield break;
    4.         }
    5.  
    6.         string[] friendIds = new string[friendsDict.Count];
    7.         friendsDict.Keys.CopyTo (friendIds, 0);
    8.  
    9.         while (true) {
    10.             PhotonNetwork.FindFriends (friendIds);
    11.             yield return new WaitForSeconds (5f);
    12.         }
    13.     }
    14.  
    15. void OnUpdatedFriendList (){
    16.         Debug.Log ("Updating friends list");
    17.         foreach (var friendInfo in PhotonNetwork.Friends) {
    18.             Debug.Log (string.Format ("{0} is {1}", friendsDict [friendInfo.Name], friendInfo.IsOnline ? "online" : "offline"));
    19.         }
    20.     }
    UPDATE : Did a quick test and the PhotonNetwork.countOfPlayersOnMaster returns 2 when the other player joins in. So I would expect that the online status gets updated for that player. I'm using version 1.53
     
    Last edited: Jun 2, 2015
  35. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    I can build for Unity Webplayer using Unity 5.0.2f + PUN v1.53 but I am unable to actually play the game when I try to create a new room, the Unity Webplayer just crashes without any debug info. I'm sure it's related to Photon as the first Scene Loads of my game which is not connected to Photon at all, but when I hit the Lobby and Start Game (initiating PUN) that's when the game crashes in the browser. I don't get any build errors either, so something is up with PUN v1.53 and Unity 5.0.2f. Any Help with this?
     
  36. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    I updated PUN to v1.54 now. It should no longer keep you from building, I hope. There are now internally 2 packages: Unity 4 without WebGL and a Unity 5.0.1p1 (and up) package which has WebGL but marked for the platform "Editor" only.
    I hope that helps. In doubt, please try to import into a new, empty project and build a demo.
     
  37. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    v1.54 (3. June 2015)
    Fixed: In Offline Mode, the NetworkingPeer.mMasterClientId always returns the local player ID. This fixes RPCs in offline mode targeted at the Master Client.
    Fixed: WebGL support no longer breaks other platform exports. Download the package from the Asset Store with Unity 5 to get WebGL support (Unity 4 can't handle it).
    Changed: WebSockets are now only used for the WebGL platform (in-editor and in export). You can't select WebSockets on any other platform (because we can't support the websocket-csharp.dll on each).
    Added: When you select "Best Region" as Hosting Type (in PhotonServerSettings), you can now select the regions that are enabled. Deselect those you don't want to use and they are dropped from the list of available regions (in the client, obviously).
    Changed: Setup Wizard. It's now considerably leaner. The idea is to improve the Inspector for the PhotonServerSettings some more. Working but also "Work in Progress".
    Fixed: A bug when setting properties via SetCustomProperties(propertiesToSet, expectedValues). Those updates were not sent reliable, so they could get lost and de-sync with any clients. This only affects currently updated clients which used this new feature (since v1.52). Thanks, Lino.
     
    jonkuze likes this.
  38. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    Cool! I'll give this a go, it might fix my current Webplayer Build issue.
     
  39. claytoncurmi

    claytoncurmi

    Joined:
    Jul 6, 2010
    Posts:
    168
    Hi tobiass,

    Regarding post 784 do you have any suggestions please?

    Regards,
    Clayton
     
  40. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    @claytoncurmi: Are you using Custom Authentication on Photon? The AuthValues?
     
  41. claytoncurmi

    claytoncurmi

    Joined:
    Jul 6, 2010
    Posts:
    168
    Sent you a pm
     
  42. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    @tobiass

    OK what is going on with PUN and Unity Webplayer? or maybe it's just Photon in general. When Building for Webplayer the past week I saw that my game was working perfectly fine. I uploaded the webplayer to my webserver, tested it, then announced that the game was playable online! Then all of a sudden no one could load the game anymore, after I tested it a number of times before announcing it.

    I tried to debug the issue for 2 days, thinking I found the problem. Resolved some minor issues with my project which happened to be unrelated to the issue. Update PUN to v1.54, and still today once again I face the same problem. I announced the game was working just fine (after I tested that it was working perfectly fine off of my webserver), then all of a sudden the game is unplayable again.

    I'm blaming Photon because it continues to crash on the loading of the scene that I actually have Photon Networking Included in. The Lobby seems to load fine, but once I start a game the Webplayer just crashes! What Gives? Now this was happens for about an hour after I announced my game was playable. It was crashing at load of the networked scene, then started working again, then crashed.... etc etc... why is this happening? Also I noticed while the game was crashing in the browser, (webplayer), I went to check the game status from the editor. I noticed I kept getting an Error in the Console Stating we could not Join or Create Room because we are not connected to Master Server.

    Note: I am using Unity 5.0.2f, PUN v1.54, Building for Unity Webplayer and currently connect to the US Region.

    Please review the support thread for my game here where this issue is being reported:
    http://forum.unity3d.com/threads/ap...wser-based-survival-game.326584/#post-2144522 (please look at the screenshots I posted there for further proof of whats happening with timestamps showing it was working then minutes later not working)

    also take note of the two times I announced the release of the Webplayer build, then an hour later other people reported the game would not load. All the while I tested it and it was working perfectly fine before I posted the updates.

    Maybe there is something going on with US Region? I didn't test other regions right now, as US is the best Region for me to test with as it's where I am located, but I will try other regions once I get back to my workstation.

    Please Advise!
     
    Last edited: Jun 5, 2015
  43. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    @Kuroato: I am sorry to read about the troubles. This is the first time we get such crashes reported, so it's nothing anyone deliberately ignored.
    The servers were up and running for approximately 20k active users.

    Usually it's pretty hard to crash Unity. Exceptions are fetched and handled, etc.. If it runs on other platforms, it might make sense to report the issue in WebPlayer to Unity. There are some regression issues sometimes.

    It makes most sense to look at the client logs.
    If you have some suspicion where things fail, you could try to modify the code. If you don't have a clue, you might need to add logs to important steps happening in code, to get some idea where things fail.

    Please get us logs and more details. Mail to developer@exitgames.com (this thread is more helpful for simple questions) and please make sure you only report issues with the webplayer. WebGL is still "WiP" in Unity itself.
     
  44. superluigi

    superluigi

    Joined:
    Feb 6, 2013
    Posts:
    38
  45. shohagmist

    shohagmist

    Joined:
    May 19, 2015
    Posts:
    37
    I have

    1. Created a Unity Project
    2. Imported PUN in Assets/Plugin folder of the Project
    3. Getting error that " error CS0246: The type or namespace name `Newtonsoft' could not be found." But I have checked in ../Editor/PhotonNetwork/, there is Newtonsoft.jason.dll and I also checked in Program Files/Unity/MonoDevelop/bin folder..there is also Newtonsoft.jason.dll is existing.
    It would be very kind If anyone clearly show me the steps of the solution.

    I am using free version of Unity and PUN. I am using Operating System : Windows 8.1 (64 bit)
     
  46. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    @shohagmist:
    Are you in Unity 5? Then the setup of the dll could be mixed up. Select it and see if you can enable it only for "Editor".
    Right click on the folder and re-import.
    Anything helps?
     
  47. shohagmist

    shohagmist

    Joined:
    May 19, 2015
    Posts:
    37
    @tobiass
    Thank you for your reply. I am in serious pain with this issue.
    Yes I am using the latest Unity 5.0.2
    Can you please explain what did you mean by [enable it only for "Editor"] ?
    Sorry if you find the question silly. I am total new in unity.
     
  48. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    @shohagmist: In Unity 5, you can define which platform uses each plugin.
    http://docs.unity3d.com/Manual/PluginInspector.html
    Search "newton" in your project. That should find the *.dll file. If not, re-import PUN. If it's there multiple times, get rid of all copies but one. Then select the single copy and setup the platform. PUN needs this dll only in Editor.
    Hope that helps.
     
  49. Half_

    Half_

    Joined:
    Jan 9, 2015
    Posts:
    1
    So, I just started working with PUN, putting things together, and it's cool, working great. But Unity 5.1 was just released, and it has all its new Networking fun, and so what PUN uses of Unity must be legacy now. So my question for @tobiass is, should I hold off on developing with PUN in anticipation for an update soon, or should I continue developing and hope for a relatively seamless upgrade?
     
  50. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    @Half_: PUN will stay very much "as is", which includes further development with new and useful stuff.
    PUN is completely independent from Unity's old networking, so you are safe to work with it.
     
    Half_ likes this.