Send event with SendEvent methode problem
Options
Comments
-
ok, i solved it - i take the list of all peers and call the sendevent in all peers, exept mine peer. is this the right way? :idea:0
-
The way is correct. This is also what we do in Rooms.
You can optimize the sending by not calling individual sends but by providing a list of target players that excludes you. This way, serialization is done less often.0 -
Tobias wrote:You can optimize the sending by not calling individual sends but by providing a list of target players that excludes you.
mhh, i have tried this :idea: if i dont remove the eventsender from the the receiverlist, the sender get the event twice, if remove him, i got still one event.
this happends, if i use eventData.SendTo :?:0 -
ok, found my mistake *facepalm*
didn't know that eventData.SendTo already send the event. i called SendEvent after it, that was the reason.0 -
Glad you found it.0