sceneView landmine

Hello!

I'm using PUN 1.15.

There's a landmine in my scene (photonView.isSceneView == true),
but it can't be properly destroyed via PhotonNetwork.Destroy() "because it wasn't instantatiated" as Unity says.

I'd like it to sync properly (so when a new player gets into the room - he doesn't see a sceneview landmine that was destroyed a few minutes ago).

What should I do?

thanks,
Slav

Comments

  • You could use a RPC to destroy scene GameObjects. Then you would just use the regular Destroy and buffer the RPC. Buffered RPCs will be sent to joining players, too.

    Keep in mind that this might result in many RPCs being sent to new players if the game has a lot of them. At some point it might be better to create a list of destroyed landmines and put it into a room property. This always is only one message to new players. Avoid strings as IDs or similar "bloat" values. The list must be small in serialized form, to be effective.