Different prefabs for owner/non-owner players with same Photon View
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on PUN.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
Different prefabs for owner/non-owner players with same Photon View
warando
2021-07-12 21:48:00
(Sorry for my bad english) Hey. I'm trying to add multiplayer to my car racing game but I met one problem.
So I have a car prefab with attached Photon View (sharing Rigidbody). I spawn it to the scene using PhotonNetwork.Instantiate and it shows up for both players and works fine. But there is one problem. The prefab contains a lot of scripts / HD interior meshes / audio sources / particles, which are important for the player who owns the car, but they are absolutely unnecessary for the second player who only needs to see the moving mesh of the car. All this puts a heavy load on the players' phones.
So I created simplified version of each car prefab inside Resources/Simplified folder. And I wonder if there is any solution to Instantiate original car prefab for owner and a simplified prefab of the same car for second player (viewer) and make Photon View synchronize their Rigidbodies?
Comments
Hi @warando,
Thank you for choosing Photon!
I think you can do this using custom prefab pool or manual instantiation.
Yeah, I think Manual Instantiation is what I needed. Thank you, @JohnTube :)
Back to top