Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

Pun 2 RemoveFromRoomCache for only local player

$
0
0
Hi team,
I would like to clear the received event for only the local player when in case of disconnection and he is reconnected but I don't want him to receive the old events which are already executed.
I tried the following method when I receive and execute the event, but it looks like it clears the event for all the players.
 RaiseEvent(photonEvent.Code, photonEvent.CustomData, new RaiseEventOptions()
                        {
                            CachingOption = EventCaching.RemoveFromRoomCache,
                            TargetActors = new int[] { PhotonNetwork.LocalPlayer.ActorNumber }
                        });

What is the correct suggested approach to using "RemoveFromRoomCache"?

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>