Photon View with already existing object in scene
Options
I couldn't find anywhere in the documentation if a GameObject that is already in the scene can be synced with others?
I've also tried to add the PhotonView Component on my GameObject at runtime but it didn't work.
Is it something PUN supports or I have to instantiate my GameObject in order to be synced?
I've also tried to add the PhotonView Component on my GameObject at runtime but it didn't work.
Is it something PUN supports or I have to instantiate my GameObject in order to be synced?
0
Comments
-
Hi @lordxjello,
Thank you for choosing Photon!
In order to be synchronized over the network, PUN requires GameObject with PhotonView components to be created using one of the following 4 methods:
- PhotonNetwork.Instantiate
- PhotonNetwork.InstantiateSceneObject
- GameObject with PhotonView already in the scene
- Manual instantiation
If you want to sync. a GameObject with PhotonView dynamically added at runtime, it's not recommended and could be a lot of trouble.
Unless the use case really requires this, use one of the methods supported out of the box.1 -
Thanks @JohnTube! I guess I'll use one the supported methods0