Photon Pun Object Pooling

Options

Hello,

I have a single player tower defense game on Steam already. I am trying to integrate multiplayer with Photon.

Currently, i am using object pooling for optimization issues (towers, bullets, particle effects etc..). For instance; when i destroy any object not using Destroy(), setting inactive that object and move to a temporary position. Whenever i need same referenced object, i take in needed position and set active true, for who doesnt know object pooling.

In Photon Pun, i want to use a similar scenario. In first instantiate no problems, using PhotonNetwork.Instantiate(). But when i set inactive game object from all clients then any client trying to instantiate same referenced object, photonViews not matching and losing onPhotonSerializeView. Or is there an object pooling example for integrating to my project?

Can you help please?

Thanks.

Answers