ChristianWiele
Active member
Hi,
I try to spawn an object over the network using the (PUN)ObjectPool in the following way:
1.) object added to the PunObjectPool
2.) Instantiate on the master with ObjectPool.Instantiate(GO, position, rotation)
3.) Network spawn with NetworkObjectPool.NetworkSpawn(...)
This all works fine, except for one thing. I destroy the object, and it is put back into the pool (with NetworkObjectPool.Destroy). If I spawn it again, the object is taken from the pool on the client, but the transform is not synced with spawning. As a result, the object is spawned at the old position (at which it was destroyed), and only after the first sync through the photon view, it appears at the new spawn position.
Is this a bug, or am I doing it the wrong way?
Regards, Christian
I try to spawn an object over the network using the (PUN)ObjectPool in the following way:
1.) object added to the PunObjectPool
2.) Instantiate on the master with ObjectPool.Instantiate(GO, position, rotation)
3.) Network spawn with NetworkObjectPool.NetworkSpawn(...)
This all works fine, except for one thing. I destroy the object, and it is put back into the pool (with NetworkObjectPool.Destroy). If I spawn it again, the object is taken from the pool on the client, but the transform is not synced with spawning. As a result, the object is spawned at the old position (at which it was destroyed), and only after the first sync through the photon view, it appears at the new spawn position.
Is this a bug, or am I doing it the wrong way?
Regards, Christian