IPunInstantiateMagicCallback Question
Options
Hello,
I'm trying to get Dissonance voice chat working with my UCC PUN project but am having a problem getting IPunInstantiateMagicCallback to work.
In the Dissonance demo scene the player is instantiated with:
In the UCC PUN scene the player is instantiated with:
and then i believe
However, with the latter IPunInstantiateMagicCallback is not called. Can anyone think of a way I can get it to be called when the player is instantiated?
Thanks,
Nathan
I'm trying to get Dissonance voice chat working with my UCC PUN project but am having a problem getting IPunInstantiateMagicCallback to work.
In the Dissonance demo scene the player is instantiated with:
PhotonNetwork.Instantiate(ObjectToSpawn.name, pos, Quaternion.identity, 0);
In the UCC PUN scene the player is instantiated with:
var player = GameObject.Instantiate(GetCharacterPrefab(newPlayer), spawnPosition, spawnRotation); var photonView = player.GetComponent<PhotonView>(); photonView.ViewID = PhotonNetwork.AllocateViewID(newPlayer.ActorNumber);
and then i believe
PhotonNetwork.RaiseEvent(PhotonEventIDs.PlayerInstantiation, data, m_RaiseEventOptions, m_ReliableSendOption);takes care of letting the network know of the instantiation.
However, with the latter IPunInstantiateMagicCallback is not called. Can anyone think of a way I can get it to be called when the player is instantiated?
Thanks,
Nathan
0