Question about the Photon3DotNet dll

I want to know what the IphotonPeerListener.OnMessage is, and information about when it is called. It does not appear in the unity dll nor does the API Doc have it listed as method on there.

Comments

  • Hi, @mjoye
    this is for a case when you send messages instead of Operations. LoadBalancing does not support this. it is useful if you develop something your self.

    A message is an object serializable by photon. it could be string or byte[]. this will allow to use external serializers like protobuf

    best,
    ilya
  • mjoyemjoye
    edited November 8
    Do you have any examples from server and client code that uses this? Why does this method appear in the Unity3d dll and only appears in the DotNet dll? It sound like to could be useful since we are looking at protobuf and MessagePak, and this could be a feature that we can use
  • @mjoye we do not have currently such samples.

    But as i said if you are going to use it with photon cloud or load balancing this will not work. It might be useful only if you write and host your code yourself

    best,
    ilya
  • I am currently am writing my own code and hosting it myself.
  • bad new that OnMessage handler is not accessible on the server side

    best,
    ilya
  • mjoyemjoye
    edited November 10
    chvetsov said:

    bad new that OnMessage handler is not accessible on the server side

    best,
    ilya

    @chvetsov what do you mean by the statement? Why does the OnMessage method appears on the IPeerListener in Photon3DotNet.dll and not Photon3Unity3D.dll
  • hey @mjoye,

    Thank you for choosing Photon!

    Maybe you are using an old Photon3Unity3D.dll provided in the server SDK.
    You could get a newer one from Photon Realtime Unity SDK.
    The newest ones are provided inside PUN2 or Voice 2.
  • @JohnTube I have download the PUN2/Voice2 asset package from the unity store. It comes with the Photon3Unity3D.dll with the version 4.1.2.1 and it lacks the method OnMessage on the IPeerListener interface. The only methods that are on the interface are:
    OnEvent
    DebugReturn
    OnOperationResponse
    OnStatusChange
Sign In or Register to comment.