RpcTarget.AllBufferedViaServer

Options
Hei,

Using PUN2

I have some RPC calls in my application that are vital to be called to ALL players who join late, and in correct order.

The object is a scene object. They "TransferOwner" when a player picks it up.

Currently this works fine until the player who called the RPC leaves.

This is when I swapped from AllBuffered -> AllBufferedViaServer, but it seems to have no effect?

I have only tested the reconnect for the player who called the RPC's, it might be that only the actor who called them does not receive them when they reconnect, but I need them to also get it once again.
EDIT: Just tested, and no actor will get any RPC called from someone who left.

What would be the best solution for this, I have read through the documentation and couldnt find a clean solution.

Would moving the script that sends the RPC calls to an object that is always a scene object solve this problem?

Bonus question: Does Observe Option affect RPC's? (unreliable, unreliable on change.. etc)
EDIT: I guess it does not as observer option !off requires IObservable which RPC do not need.


Thanks!

Comments

  • Dipiis
    Dipiis
    edited March 2019
    Options
    I did some testing using RaiseEvent method and it works perfectly, the playing calling event can leave room and reconnect and get the call in correct order (Code shortened a lot):
    	raiseEventOptions.CachingOption = EventCaching.AddToRoomCacheGlobal;
    
    	public void OnEvent (EventData photonEvent) {
    
    		byte eventCode = photonEvent.Code;
    
    		if (eventCode == ConnectTheThingEvent) {
    
    			ConnectTheThing();
    		
    		}
    	
    	}
    But this feels like a monkey fix. I am basically just faking RPC calls, sending null as RaiseEvent content. This will make my code look very ugly.