Quantcast
Channel: Photon Voice — Photon Engine
Viewing all articles
Browse latest Browse all 671

Photon Voice's problem with warning:No PhotonView with ID {0} found. Remote voice {1}/{2} not linked

$
0
0
We got a strange problem. We have two persons in a photon room and we load a specified scene, the first joined person can hear the second joined person but the second cannot hear the first person.On the second person's player prefab instance, the audio source from the first person's clone don't have a AudioClip(AudioStreamPlayer) attached, the reason is that when it tries to create the audio clip, the first person's clone is not created yet.So it cannot find the viewID, and the next process are all passed...see next the call to SpeakerFactory returns null...
private void OnRemoteVoiceInfo(int channelId, int playerId, byte voiceId, VoiceInfo voiceInfo, ref RemoteVoiceOptions options)
        {
            if (this.Logger.IsInfoEnabled)
            {
                this.Logger.LogInfo("OnRemoteVoiceInfo channel {0} player {1} voice #{2} userData {3}", channelId, playerId, voiceId, voiceInfo.UserData);
            }

            if (fpeakerFactory != null)
            {
                Speaker speaker = SpeakerFactory(playerId, voiceId, voiceInfo.UserData);
                if (speaker != null)
                {
                    speaker.OnRemoteVoiceInfo(voiceInfo, ref options);
                    if (speaker.Actor == null && this.Client.CurrentRoom != null)
                    {
                        speaker.Actor = this.Client.CurrentRoom.GetPlayer(playerId);
                    }
                    if (SpeakerLinked != null)
                    {
                        SpeakerLinked.Invoke(speaker);
                    }
                }
            }
        }
It is strange because that when load other scenes the voice is OK.The difference is that we do some bake work on the problematic scene . I think the command sequence sent from server is not correct.So Which cases cause this??

Viewing all articles
Browse latest Browse all 671

Trending Articles