Hi,
I dynamically spawn networked ObjectPickup's (ObjectPool.Instantiate+NetworkObjectPool.NetworkSpawn). They should be destroyed once picked up. Currently they are only destroyed if picked up on the MasterClient because in ObjectPickup->ObjectPickedUp->NetworkObjectPool.Destroy we only broadcast the ObjectDestruction event when we are the MasterClient. With non dynamically spawn networked ObjectPickup's, Respawner+PunLocationMonitor is responsible for syncing the active state.
I worked around the problem by making all clients aware of the object being picked up. Patch is attached due to character size limit.
Now that the ObjectPickedUp2 (there is probably a better name for it) method is called on all clients, I was also able to play the pickup audio on all clients altough that is not part of this patch.
What are your thoughts on this? Regarding the pickup audio i'm not sure how to generalize my patch as I can imagine someone wants a pickup sound on all clients vs only the player who picks it up which is the current bahavior.
Thanks!
I dynamically spawn networked ObjectPickup's (ObjectPool.Instantiate+NetworkObjectPool.NetworkSpawn). They should be destroyed once picked up. Currently they are only destroyed if picked up on the MasterClient because in ObjectPickup->ObjectPickedUp->NetworkObjectPool.Destroy we only broadcast the ObjectDestruction event when we are the MasterClient. With non dynamically spawn networked ObjectPickup's, Respawner+PunLocationMonitor is responsible for syncing the active state.
I worked around the problem by making all clients aware of the object being picked up. Patch is attached due to character size limit.
Now that the ObjectPickedUp2 (there is probably a better name for it) method is called on all clients, I was also able to play the pickup audio on all clients altough that is not part of this patch.
What are your thoughts on this? Regarding the pickup audio i'm not sure how to generalize my patch as I can imagine someone wants a pickup sound on all clients vs only the player who picks it up which is the current bahavior.
Thanks!