Max photon view?

XxMBxX
XxMBxX

Hello, I'm building a multiplayer building system with pun2, so each asset placed got a photonview+transform view, is there a limit on how much photonview can be placed? If yes, what can be done about it?

Best Answer

  • Tobias
    Tobias admin
    Answer ✓

    If you can identify your objects in the network in some other way, you don't need a PhotonView at all. It's just a way to come up with IDs at runtime and without clashing. You don't have to use this at all. You can use RaiseEvent(yourEvent) and in yourEvent, you'd name the ID of the object you target and modify in some way.


    If it's working in your implementation, then .. use PhotonViews. It's fine. I just can't say if it will work in this or that case, without testing.

Answers

  • There is no hard limit but unless your building system is quite limited, I don't expect the PhotonViews to keep up with your demand.

    In doubt, give it a quick go and build a proof of concept.

  • I've already implemented it, here's a video.

    Is it possible to only add a photon view on the objects that currently need to move and destroy after it's placed all via RPC? Or should the photon view already be present? Thanks

  • Tobias
    Tobias admin
    Answer ✓

    If you can identify your objects in the network in some other way, you don't need a PhotonView at all. It's just a way to come up with IDs at runtime and without clashing. You don't have to use this at all. You can use RaiseEvent(yourEvent) and in yourEvent, you'd name the ID of the object you target and modify in some way.


    If it's working in your implementation, then .. use PhotonViews. It's fine. I just can't say if it will work in this or that case, without testing.