#Synchronizing objects for late joining clients

13 messages · Page 1 of 1 (latest)

river thicket
#

Do you use BufferLast = true on your ObserversRpc? [ObserversRpc(BufferLast = true))]

river thicket
#

The way I do it is, I use a syncvar for the weapons. I created an enum of the weapons, and then sync the weapons that way

pliant iron
#

And you handle weapon pickup through sync var?

river thicket
#

yeah

#

that way its always up to date for late joiners

pliant iron
#

I will try implementing it and see how it goes

#

I guess I can have an int ownerID as a Sync var and when that changes I could do the pickUp/drop logic in the callback

#

Would that be a right way of handling it?

river thicket
#

I dont let my players drop/pickup weapons so I wouldn't know where to begin with that, but, I also dont use networked objects for weapons either

#

I create/destroy it anytime they swap before respawn

pliant iron
#

Ah I see well I can try and figure out a way to do it with SyncVar

#

@river thicket thanks for taking the time