Hi everyone,
I have run into a problem with my view id allocation in PUN.
Each player in my game has the ability to throw stones. Once thrown, these stones need to be observed by every client, hence they all have their own photon view. The problem with that is, that after a little while players run out of view ids to instantiate new stones. I found another thread that recommended using a single photon view to synchronize a player's bullets in a fps, but I would rather have them manage themselves until destruction.
Upon further inspection of the PhotonNetwork class I discovered the method "UnAllocateViewID" and tried using it right after my call to PhotonNetwork.Destroy to release the stones view id after it was destroyed. This should fix my problem because the player will never be able to exceed the MAX_VIEW_ID limit at any given point in time. But that did not work as I expected. Most view ids were never unallocated and those that were, were never reallocated.
Is there a way to release unused view ids and reuse them for other photon views?
Cheers,
KB
I have run into a problem with my view id allocation in PUN.
Each player in my game has the ability to throw stones. Once thrown, these stones need to be observed by every client, hence they all have their own photon view. The problem with that is, that after a little while players run out of view ids to instantiate new stones. I found another thread that recommended using a single photon view to synchronize a player's bullets in a fps, but I would rather have them manage themselves until destruction.
Upon further inspection of the PhotonNetwork class I discovered the method "UnAllocateViewID" and tried using it right after my call to PhotonNetwork.Destroy to release the stones view id after it was destroyed. This should fix my problem because the player will never be able to exceed the MAX_VIEW_ID limit at any given point in time. But that did not work as I expected. Most view ids were never unallocated and those that were, were never reallocated.
Is there a way to release unused view ids and reuse them for other photon views?
Cheers,
KB