• We are looking for a content creator to help market our assets and a future unannounced project. More details are on this page.

Stop PUN addon from syncing world objects. Only sync third-Person character

AmmarByFar

New member
I recently purchased UTPS along with the PUN addon and was able to get everything working correctly.

However I've got various groups of objects that I'm either activating and deactivating based on where the player is, to save on memory resources. These are world objects like walls, buildings, etc...

I noticed that if one player enters a trigger to deactivate the objects behind him and activate the objects in front, those objects are also deactivated for all other players.

All I want is to sync the character and nothing else. Does pressing the "Setup Scene" in the manager for the PUN addon make it so that all objects in the scene are synced with all users? Is the only a PUN specific thing that I should be posting on their forums?
 

Justin

Administrator
Staff member
Does pressing the "Setup Scene" in the manager for the PUN addon make it so that all objects in the scene are synced with all users
No, that just adds an object identifier so the character controller will know what object was hit. The PunLocationMonitor will sync the object state so if you don't have that component added then it's not the character controller doing the synchronization.
 

AmmarByFar

New member
Thank you for the answer! Turns out I was forgetting to do a check of GameObject<PhotonView>().IsMine within the OnTrigger, so anyone who collided would have the world objects deactivate for everyone else.
 
Top