I need help trying to implement a pool system for my rpc photon.Instantiated prefabs

Options

I need help trying to implement a pool system for my rpc photon.Instantiated prefabs, i know how to make both separately, when i try and make them together the object gets pooled like normal on the player who received rpc but for the other players who are viewing the photonview gameobject the gameobject sit there and doesnt returnToPool..

i think i know why it doen't work because the pool has no reference to the photonview version of the gameobject, which kind of leaves me stumped and trying to figure out another solution.. any help or advice would be very much appreciated

sorry i cant leave code reference i deleted code and im just instantiating without a pool until i can figure something out.😄

Answers

  • Dibbie
    Dibbie ✭✭
    Options

    You could use OnPhotonInstantiate for each player to spawn their own pool over the network, then when a player does something locally to trigger the pool, send that as a RPC or RaiseEvent for other players, and same when it reaches the end of its lifetime or whatever condition(s) return it back to the pool for that local player - It sounds like you may not have any current way of sending "im done here send me back to the pool", unless the object being activated is happening correctly but after that it doesnt do anything interesting? (such as a bullet not moving forward)