Hello.
I am developing a multiuser app for hololens that lets the users cooperate and manipulate graphics loaded in the scene. There is no problem at all when I load prefabs which contain graphics related components and the PhotonView component as well as other functionality components.
Since that requires these models to be saved as prefabs, I need to generalize this functionality and let users share simple 3d models with each other, with PhotonView and other components attached at runtime.
Instantiating the game objects is done similarly to manual instantiation example found here:
After instantiating, I attach PhotonView and configure it:
GameObject instance = Instantiate(gameObject);
PhotonView photonView = instance.AddComponent<PhotonView>();
photonView.OwnershipTransfer = OwnershipOption.Takeover;
photonView.FindObservables(true);
I keep ending up in the same 2 errors.
The first one occurs when, after instantiation, the master client simply clicks on the gameobject on scene. The error shows up only to the other clients.
Can’t find PhotonView of incoming OwnershipRequest. ViewId no found: -999.
The second error appers when the master client tries to move the gameobject and, again, it shows up only to the other clients.
Rceived OnSerilization for view Id -999. We have no such PhotonView! Ignore this if you’re joining or leaving the room. State: Joined.
Full script attached.Excuse my horrible code.[197701-modelloadmanager.txt|197701]