I’m currently making a mrtk app that get the glb, or fbx file from the server and synchronized their movement that changed by the ‘NearInteractionGrabbable’ script using photon Network
So I tried to add the ‘Photon view’ script at runttime by
Addcomponent(typeof(PhotonView)
But it seems that the object is not added in the ‘observed component list’ in ‘PhotonView’ Script.
Is there a way to fix this…?
or you can just give me good way to synchronize the movement of object other than using photon
You have to assign a ViewID (use PhotonNetwork.AllocateViewID) and add scripts to the PV observed list.
We call this Manual Instantiation and it can be a bit tricky.
An alternative is to have a base prefab, which you instantiate via PUN, then one of your components loads the assets and applies them (e.g. to replace some base version).
Thank you for your reply
I also wanna know If I make a empty object that have PhotonView script and make a loaded object as a child of that empty object will it give me a same effect and able to synchronize the object?