Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Photon Unity Networking

Discussion in 'Connected Games' started by tobiass, Aug 23, 2011.

  1. Elendarys

    Elendarys

    Joined:
    Sep 14, 2017
    Posts:
    4
    Using photon for persistent worlds, would I need multiple photon servers or would it suffice to use rooms?
     
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    2,079
    @vsnry: You only pay for the CCU once, no matter if you use the Photon Cloud or Photon Server.
    Using the Photon Server enables you to run "as is" (similar to the Photon Cloud), you can add logic or rewrite the stock solution almost entirely.
     
  3. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,024
    @tobiass Hey I have a issue with Photon Chat.
    When I subscribe to a channel "Test" and then change scenes and then unsubscribe to channel "Test". It errors and says I wasn't subscribed to channel "Test".

    • If I unsubscribe to channel "Test" while staying on the same scene it works fine.
    • The chat server stays connected.
    • The Game Object that the IChatClientListener is attached to is set to don't destroy on scene change.
    • When I change scenes it doesn't run the call back OnUnsubscribed for channel "Test". So its not saying it ever Unsubscribes from that channel or it does but never calls the call back.
    • I can subscribe to a new channel with no issue on the next scene.


    After debugging all this. I also realized when I subscribe to a channel that has already been subscribed it doesn't say error saying already subscribed to that channel? Is that the attended behavior? If so then what is going on. Is it creating two channels with the same name or is it just over riding it.
    If it just over rides it than that is fine i can just keep track of the channels the user subscribes too.

    But this unsubscribe thing im not sure whats going on here.
    Based on my tests it seems it just deletes all channels when the change changes and doens't run the call back OnUnsubscribed for them.

    On a side note. Its been about 6 months since I've messed with the chat networking on my game but it does seem like I remember it not allowing me to subscribe to a channel that is already subscribed too. so idk.

    using Unity 2018.2.18
     
  4. o8que

    o8que

    Joined:
    Oct 13, 2018
    Posts:
    1
    Hello,
    I found an issue with the calculation of lag in Lag Compensation.
    Code (CSharp):
    1. float lag = Mathf.Abs((float) (PhotonNetwork.Time - info.timestamp));
    It wasn't correctly considered that PhotonNetwork.Time value will wrap around.
    If PhotonNetwork.Time is 0 and info.timestamp is 4294967, "lag" will be 4294967!

    So I'm currently using PhotonNetwork.ServerTimestamp to calculate lag to avoid this issue.
    Code (CSharp):
    1. float lag = unchecked(PhotonNetwork.ServerTimestamp - info.timeInt) / 1000f; // changed info.timeInt from private to public
    I hope this helps.
     
  5. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    2,079
    @o8que: Good find. Thanks! We will put this in the next update.
    @Shadowing: I asked a colleague to check this out.
     
  6. JohnTube

    JohnTube

    Joined:
    Sep 29, 2014
    Posts:
    44
    Hi @Shadowing

    Thank you for choosing Photon!

    What is the Photon Chat API version you use?
    Check the Photon3Unity3.dll version or if it's from PUN check the PUN version.

    Yes, it is the intended or expected behaviour.
    The server does not return an error in this case. Nothing changes, the client stays subscribed to the same channel.
    We could improve this by triggering an error or a warning on the client side.
    If the scene loading delay is big enough, probably the client got disconnected, did you check the OnDisconnected callback?
     
    Shadowing likes this.
  7. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,024
    Hey @JohnTube
    Seems I have 3 Photon3Unity3D.dll files
    Been wanting to remove Photon networking package from my project cause I only use photon chat.
    Two of the files are product version 4.1.1.20 and the other one is Product Version 4.0.0.12

    ya there was no chat disconnect. Keep in mind i was able to subscribe to a channel as well as talk in chat etc.. Chat fully operational on next scene.
    Actually I just realized im calling Unsubscribe before changing the scene. There is a 8 second wait before the Change Scene function is called. (For visual effect reasons)
    so thats odd hmm. Its not happening on the same frame then.
    Almost tells me it has nothing to do with the scene changing now.

    OnDisconnected doesn't get called. I have a debug.Log on that also it would kick me back to login scene etc. I just tested and doubled checked that.


    I'll do a couple more tests. Help rule out scene changing or not.
     
    JohnTube likes this.
  8. sob_unity

    sob_unity

    Joined:
    Nov 21, 2018
    Posts:
    1
  9. JohnTube

    JohnTube

    Joined:
    Sep 29, 2014
    Posts:
    44
    Hi @sob_unity,

    Thank you for choosing Photon!

    You can use PUN+'s 100CCU with PUN2.
    So you can purchase PUN+ Classic, redeem the Unity Invoice Nr. here for one AppId then download PUN2 free and use that AppId.
    There is no difference between PUN2 and PUN2+ other than the 100CCU.
     
  10. jeffersoncosta

    jeffersoncosta

    Joined:
    Aug 11, 2018
    Posts:
    4
    I'm using the Corgi Engine and in previous versions of Photon i was able to add the MoreMountains.CorgiEngine namespace on the PhotonNetwork class, but now it does not work anymore . upload_2018-12-27_14-42-38.png
     
  11. DavidSWu

    DavidSWu

    Joined:
    Jun 20, 2016
    Posts:
    48
    I am trying to decide whether or not to upgrade to 2.0. We have a relatively large product.
    What are the benefits of 2.0?
    Benefits:
    - Seems that simplifying the lobby system is a plus.
    - Seems like callbacks *might* be more efficient
    - Latest updates
    - Not using a deprecated system
    - Performance improvements (?)
    Costs:
    - All sorts of arbitrary name changes (dear god, why?)
    - API functionality changes will require refactoring
    - Potentially less stable than PUN classic as it is still relatively early.

    Am I missing anything?

    Thanks!

    David Wu
     
  12. banksazero

    banksazero

    Joined:
    May 8, 2015
    Posts:
    62
    Hi
    I wonder if I'd like to use login system for keeping player's stat and items what I need to know and do?
     
  13. JohnTube

    JohnTube

    Joined:
    Sep 29, 2014
    Posts:
    44
    Hi @jeffersoncosta,

    Thank you for choosing Photon!

    I think you are probably using a Unity 2017.3+ (or higher/newer) which supports asmdef.
    If you want to modify PUN2 code you will need to reference any external assemblies in its respective asmdef file.
    Read this post on our forum here.
     
  14. SteveRyu

    SteveRyu

    Joined:
    Apr 9, 2014
    Posts:
    121
    Hi,
    Is there any way to cancel the coupon use?
    I used it on the wrong one. Chat server, not realtime one.
    I already sent email to support team and posted the same question on photon forum but there's no answer so I post it here.
    Please help me, thanks.
     
  15. JohnTube

    JohnTube

    Joined:
    Sep 29, 2014
    Posts:
    44
    I replied to your forum post here.
     
  16. JohnTube

    JohnTube

    Joined:
    Sep 29, 2014
    Posts:
    44
    Hi @banksazero,

    Thank you for choosing Photon!
    We recommend PlayFab.
    You can integrate their services with Photon apps.
     
  17. neodotca

    neodotca

    Joined:
    Feb 20, 2016
    Posts:
    119
    Is it possible to make one multiplayer battle Royale game, taking place in different maps/levels at the same time. Instead of having one big open world map, the action takes place in many smaller levels, where the players can move from a level to another until there's only one standing?
     
  18. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    2,079
    You could split the world into multiple scenes and even into multiple "rooms" for the networking but then you will have to think about handling the edges. If players can run along an invisible edge, they have to load and unload scenes, depending on which side they happen to be from frame to frame? Also, if you don't load the scene next to the active one, you may be able to see players, which should hidden by obstacles (which you didn't load yet)?
     
  19. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    994
    You could make players in the 'other' scene invisible also, much like the phasing in WoW. That's how I handle multiple scenes (maps) in my RPG.
     
  20. neodotca

    neodotca

    Joined:
    Feb 20, 2016
    Posts:
    119
    Thank you for your answers, I'm just starting to learn about multiplayer. I'm not talking about splitting a world in multiple scenes or rooms, I'm talking about complete separate levels, just like an adventure game where your player will move to the next level...loading a new level using "persistence". You won't be able to see the players that are not in the level you are in because they are just not in your level. In short, a regular multiplayer game, but not only on one level, but complete separate levels. Thanks!
     
  21. JamesGartland

    JamesGartland

    Joined:
    Jun 1, 2017
    Posts:
    8
    Hello, I'm new to Photon and I'm getting an annoying Editor bug with PUN 2 and Unity 2018.3.

    After Playing the game once in editor I can no longer add components to. GameObjects via the 'Add Component' button in the Inspector window. The only workaround I've found so far is to close and restart Unity, but this means I have to restart to add components after every single play test.

    Clicking the 'Add Component' button gives me this error

    Code (CSharp):
    1. ArgumentException: An element with the same key already exists in the dictionary.
    2. System.Collections.Generic.Dictionary`2[System.String,System.String].Add (System.String key, System.String value) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)
    3. UnityEditor.AdvancedDropdown.AddComponentDataSource.GetMenuDictionary () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/AddComponent/AddComponentDataSource.cs:70)
    4. UnityEditor.AdvancedDropdown.AddComponentDataSource.RebuildTree () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/AddComponent/AddComponentDataSource.cs:17)
    5. UnityEditor.AdvancedDropdown.AddComponentDataSource.FetchData () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/AddComponent/AddComponentDataSource.cs:10)
    6. UnityEditor.AdvancedDropdown.AdvancedDropdownDataSource.ReloadData () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/AdvancedDropdown/AdvancedDropdownDataSource.cs:22)
    7. UnityEditor.AdvancedDropdown.AdvancedDropdownWindow.OnDirtyList () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/AdvancedDropdown/AdvancedDropdownWindow.cs:202)
    8. UnityEditor.AdvancedDropdown.AdvancedDropdownWindow.Init (Rect buttonRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/AdvancedDropdown/AdvancedDropdownWindow.cs:95)
    9. UnityEditor.AdvancedDropdown.AdvancedDropdownWindow.CreateAndInit[AddComponentWindow] (Rect rect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/AdvancedDropdown/AdvancedDropdownWindow.cs:79)
    10. UnityEditor.AdvancedDropdown.AddComponentWindow.Show (Rect rect, UnityEngine.GameObject[] gos) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/AddComponent/AddComponentWindow.cs:68)
    11. UnityEditor.InspectorWindow.AddComponentButton (UnityEditor.Editor[] editors) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1811)
    12. UnityEditor.InspectorWindow.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:680)
    13. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    14. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    15. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    16. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    17. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:342)
    18. UnityEditor.HostView.Invoke (System.String methodName) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:336)
    19. UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition, Rect viewRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:302)
    20.  
     
  22. JohnTube

    JohnTube

    Joined:
    Sep 29, 2014
    Posts:
    44
    Hi @JamesGartland,
    Thank you for choosing Photon!
    Could you try my suggestion here.
     
  23. rubble1

    rubble1

    Joined:
    Apr 25, 2010
    Posts:
    73
    Hi,

    I'm having some problems using PUN.
    I'm using a character system that can't be enabled on the remote, due to some animator settings (Third Person Motion Controller). I need it to equip a weapon over the network.

    I've created a script that gets the name, transform and parent of this object and is supposed to recreate it across the network. Everything is working fine on the local view, and all I need is for it to instantiate the object for the remote player.

    As a side note, when I was working in PUN classic a while back, I could playtest a connected game in the Unity editor, which made things a lot easier. Is this different in PUN2 or am I doing something wrong?

    My game works this way: I have a game manager script instantiating the player (similar to the Asteroids demo). This player has the script mentioned above that gathers local info (mentioned above), stores them in a local variable in my first function (let's call it "SendPhotonEquip"). This script is observed by that player's photon view.

    Having gathered all the info on the item equipped, it calls up a PunRPC function that will instantiate an item on the remote player.

    Code (CSharp):
    1.             photonView.RPC("PhotonEquip", RpcTarget.OthersBuffered);
    I then send it off to the actual function that will create the item. This function tests to see if the view is local or remote, and if it's remote it will instantiate the object:

    Code (CSharp):
    1.     [PunRPC]
    2.     public void PhotonEquip()
    3.     {   //This actually creates the items on the remote player.
    4.  
    5.  
    6.         if (rWeaponTemp != null)
    7.         {
    8.  
    9.             GameObject rWeaponObject = Resources.Load<GameObject>(rPath);
    10.             PhotonView rWeaponID = rWeaponObject.GetPhotonView();
    11.             rWeaponID = photonView;
    12.             (PhotonNetwork.Instantiate(rPath, rWeaponPosTemp, rWeaponRotTemp) as GameObject).transform.parent = rWeaponParent.transform;
    13.  
    14.             return;
    15.         }
    16.  
    17.  
    18.     }
    Again, if I use "AllBuffered" when calling it up, it does instantiate about two extra versions of the item on my local view (so something's working), but when I use "OthersBuffered", I don't see the remote player's item.

    I've tried different things. For example, getting rid of the if (photonView.IsMine) statement in the second function, and even placing a check on the first function. Neither work.

    I would really welcome any advice or suggestions. Thanks.
     
  24. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    2,079
    You're multiplying the instanced object by letting everyone else network-instantiate the GO (within the RPC).
    You can either PhotonNetwork.Instantiate() something or use a RPC to do about the same by (locally only) instantiating the GO.
    I guess this causes the issues without going into deeper analysis of it.

    PUN 2 runs in the Editor just like PUN Classic does. So a build and an Editor can be used to test.
    Make sure the Editor and build are connected to the same region and don't run ConnectAndJoinRandom at (about) the same time. During development, this script may miss the other instance's room and end up in a separate one.
     
    rubble1 likes this.
  25. rubble1

    rubble1

    Joined:
    Apr 25, 2010
    Posts:
    73
    @tobiass, thank you! that really helps.

    Following your suggestion, I do now have it appearing for the remote client, but I think it still also instantiates at least 2 extras on the local.
    How do I get the object to only appear for the remote player?

    Also, on the position of the item.
    Once this was working, I did notice it wasn't really attached to the player's hand, so I put a Transform view on it, and it did move with the player, but had a sort of a lag to it. It does need the transform view, right? I can't just rely on the parent to move it around? I'm playing around with it to see which behaves better, the Photon Transform View or the Transform Classic view, but can't really tell yet.

    Anyway, there are still some things to be worked out, but I can begin to see now. Thank you so much for the help.
     
    Last edited: Jan 12, 2019
  26. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    2,079
    Not knowing your case I wonder:
    Why do you network-instantiate something that just one of the clients would see and care about?
    It doesn't have to be networked, if not everyone sees it anyways. If there is no local representation of said networked object, only one client knows about it. Then it could be fully local.

    If you want (e.g.) your hands to be shown to everyone, you would network-instantiate them once and that's it. Everyone in the room will create the representation. When the hands get instantiated, they Awake. Put a script on them and can check "isMine" to change how the representation looks like (locally, you could use another look than remotely).
    Check out the basics tutorial and actually code along as you read it. This should help, I hope.


    > but had a sort of a lag to it.

    Yes. That is simply lag.

    > I can't just rely on the parent to move it around?

    Not magically, no. If the parent has a PhotonView, it may gather and include the info of the attached child nodes and send it along with it's own info.
     
  27. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    611
    Hi Tobiass

    We have a page on our game where the user can select which region they want to play in. This page also shows the pings of each region. (We get the ping using RegionPinger, pinging all regions manually).

    It would be awesome to be able to display the amount of activity in the region. A player count would be ideal, even if rough, and we could either display this number as an approximate or map different player count number ranges to different sprites to give an indicator of 'activeness' (ie low activity - 1 person silhouette, high activity = 10 people silhouettes, etc). The point is it doesnt have to be accurate :)

    Is this possible?
     
  28. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    2,079
    Getting stats about the regions' activity is not built-in but the idea has been around for a while.
    The count of players and rooms is available to any client on the Master.
    You could create a service that connects to each region in intervals and fetches the Application Stats from each master. Clients could get this from your service.
     
    Prodigga likes this.
  29. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,024
    @tobiass any chance you guys can build a serverside software that runs on linux build of Unity?

    Or are you guys getting close to releasing a linux server yet? Been waiting a long time :(
    Sucks your server side software is only Windows Server :(

    Can't you just build it using Python?
     
  30. EthanHooper1023

    EthanHooper1023

    Joined:
    Jan 19, 2017
    Posts:
    3
    Hello,
    I'm trying to add my current room to a list to display in the master lobby later, but when I try to add my current room to a list of type RoomInfo it gives me a huge error.

    RPC to add to list:
    Code (CSharp):
    1. public PhotonView pv;
    2.  
    3.     void Start()
    4.     {
    5.         pv.RPC("AddRoom", RpcTarget.AllBuffered, new object[] { PhotonNetwork.CurrentRoom });
    6.     }
    PunRpc Method:
    Code (CSharp):
    1. [PunRPC]
    2.     public void AddRoom(RoomInfo room) {
    3.         punConnect.GetRoomList().Add(room);
    4.         Debug.Log("Server Added Room: " + room.Name);
    5.     }
    Exception: Write failed. Custom type not found: Photon.Realtime.Room
    ExitGames.Client.Photon.Protocol18.WriteCustomType (ExitGames.Client.Photon.StreamBuffer stream, System.Object value, Boolean writeType) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/Protocol18Write.cs:685)
    ExitGames.Client.Photon.Protocol18.Write (ExitGames.Client.Photon.StreamBuffer stream, System.Object value, GpType gpType, Boolean writeType) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/Protocol18Write.cs:46)
    ExitGames.Client.Photon.Protocol18.Write (ExitGames.Client.Photon.StreamBuffer stream, System.Object value, Boolean writeType) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/Protocol18Write.cs:25)
    ExitGames.Client.Photon.Protocol18.WriteObjectArray (ExitGames.Client.Photon.StreamBuffer stream, IList array, Boolean writeType) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/Protocol18Write.cs:602)
    ExitGames.Client.Photon.Protocol18.Write (ExitGames.Client.Photon.StreamBuffer stream, System.Object value, GpType gpType, Boolean writeType) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/Protocol18Write.cs:106)
    ExitGames.Client.Photon.Protocol18.Write (ExitGames.Client.Photon.StreamBuffer stream, System.Object value, Boolean writeType) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/Protocol18Write.cs:25)
    ExitGames.Client.Photon.Protocol18.WriteHashtable (ExitGames.Client.Photon.StreamBuffer stream, System.Object value, Boolean writeType) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/Protocol18Write.cs:368)
    ExitGames.Client.Photon.Protocol18.Write (ExitGames.Client.Photon.StreamBuffer stream, System.Object value, GpType gpType, Boolean writeType) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/Protocol18Write.cs:79)
    ExitGames.Client.Photon.Protocol18.Write (ExitGames.Client.Photon.StreamBuffer stream, System.Object value, Boolean writeType) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/Protocol18Write.cs:25)
    ExitGames.Client.Photon.Protocol18.WriteParameterTable (ExitGames.Client.Photon.StreamBuffer stream, System.Collections.Generic.Dictionary`2 parameters) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/Protocol18Write.cs:167)
    ExitGames.Client.Photon.Protocol18.SerializeOperationRequest (ExitGames.Client.Photon.StreamBuffer stream, Byte operationCode, System.Collections.Generic.Dictionary`2 parameters, Boolean setType) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/Protocol18Write.cs:186)
    ExitGames.Client.Photon.EnetPeer.SerializeOperationToMessage (Byte opCode, System.Collections.Generic.Dictionary`2 parameters, EgMessageType messageType, Boolean encrypt) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/EnetPeer.cs:1138)
    ExitGames.Client.Photon.EnetPeer.EnqueueOperation (System.Collections.Generic.Dictionary`2 parameters, Byte opCode, SendOptions sendParams, EgMessageType messageType) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/EnetPeer.cs:974)
    ExitGames.Client.Photon.PhotonPeer.SendOperation (Byte operationCode, System.Collections.Generic.Dictionary`2 operationParameters, SendOptions sendOptions) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PhotonPeer.cs:1496)
    Photon.Realtime.LoadBalancingPeer.OpRaiseEvent (Byte eventCode, System.Object customEventContent, Photon.Realtime.RaiseEventOptions raiseEventOptions, SendOptions sendOptions) (at Assets/Photon/PhotonRealtime/Code/LoadbalancingPeer.cs:870)
    Photon.Realtime.LoadBalancingClient.OpRaiseEvent (Byte eventCode, System.Object customEventContent, Photon.Realtime.RaiseEventOptions raiseEventOptions, SendOptions sendOptions) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:1598)
    Photon.Pun.PhotonNetwork.RaiseEventInternal (Byte eventCode, System.Object eventContent, Photon.Realtime.RaiseEventOptions raiseEventOptions, SendOptions sendOptions) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:2141)
    Photon.Pun.PhotonNetwork.RPC (Photon.Pun.PhotonView view, System.String methodName, RpcTarget target, Photon.Realtime.Player player, Boolean encrypt, System.Object[] parameters) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1242)
    Photon.Pun.PhotonNetwork.RPC (Photon.Pun.PhotonView view, System.String methodName, RpcTarget target, Boolean encrypt, System.Object[] parameters) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:2682)
    Photon.Pun.PhotonView.RPC (System.String methodName, RpcTarget
     
  31. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    2,079
    @Shadowing: We're not there yet. Would you just run the pre-built Photon "LoadBalancing" or would you want to run custom logic, too?

    @EthanHooper1023: The error tells you that the Room (or RoomInfo) class can't be serialized.
    RPCs are only sent within the room you're active in. So there is no use to send it with an RPC, actually.
    We've got lobbies on the Master Server, should you want to fetch the list of rooms. Any other sort of room listing must be done externally.
    What's the plan?
     
  32. Appminis

    Appminis

    Joined:
    Apr 12, 2014
    Posts:
    123
    How do you prevent cheating with PUN? And aren't there issues with a player hosting a game if there are lots of other players? Would worry about latency. Can competitive multiplayer comes use PUN without issue?