confirmation about PublishEvent from LiteLobby application

Options
Paresh
edited November 2011 in Photon Server
hi,

I just want to confirm about PublishEvent in Room.cs
        protected void PublishEvent(LiteEventBase e, IEnumerable<Actor> actorList, Reliability reliability, byte channelId, bool sendImmediately)
        {
            EventData eventData = e.GetEventData(e.Code, reliability, channelId, sendImmediately);
            foreach (Actor actor in actorList)
            {
                actor.Peer.PublishEvent(eventData);
            }
        }

is it the way message is broadcasting in a room? I thought we can broadcast the message in Room just by calling one function but here it is sending to each of the user inside room.

this how it works or I am missing something?

thanks.

Comments

  • Tobias
    Options
    Which server SDK version are you using?
    The latest is ExitGames-Photon-Server-SDK_v3-0-12-2468-RC4.zip and it makes use of the new EventData method: SendTo(). This will try to serialize an event only once and sent the same binary data to everyone.

    Aside from this, you're doing it right.
  • i am using Photon v2.ExitGames-Photon-Server-SDK_v2-6-11-1647 because I am working in marmalade...