I am trying to know who is talking on server and have a indicator game object on my player prefab. I want it to show up when player is talking but it shows up locally (the player's ingame does not sees it)
Can you guys help? Thanks.
For remote voices, you need to check PhotonVoiceView.IsSpeaking, not IsRecording.
Don't call expensive GetComponent in Update and don't use RPC. Instead, find PhotonVoiceView instance in Awake and use it for IsSpeaking check in Update(). See Highlighter.cs in DemoVoicePun project.
@vadim Thanks for advices. All good now but when I talk, everyone's indicator except me is getting active. Only the one who talks is not getting active. Do you have any advices for this?
Did you follow Highlighter.cs sample? Does this sample work correctly for you? I think, you just made a small mistake like searching for the wrong object in Awake. Check you code carefully.
@vadim Yes I followed it but it doesn't work for me. Where should I add this script, to my character or on an item on my scene?
So it works in Voice PUN demo but not in you project?
In the demo, the script is attached to the character prefab. The script has 2 properties which must be set In the Editor to images that are parts of the prefab and represent recording and speaking states.
@vadim When I try to build and test Voice PUN Demo it happens same. When I try to talk on a build, every build sees it like its the one talking. Does the script capture the mic independent for builds? I mean if I try it on same computer, I can't test it right?
When several app instances run on the same compuer, the mic is shared between them and every instance can capture and broadcast the same mic input. Start recording on one instance only to highlight the recorder on this instance and all corresponding speakers on other instances.
analyze performance and traffic on our website.
By clicking on the „Accept All“ button you consent to the use of non-functional cookies and the subsequent
processing of personal data to optimize our website and services as described in more detail in our
By clicking on the „Customize or Deny all“ button you can decide otherwise.
Clicking on the „Customize“ button will take you to a page where you can configure the usage of non-functional
cookies (and related technologies) or deny all of them. You can access these settings at any time and also
subsequently deselect cookies at any time in the footer area of our website.
We use the following categories of cookies and related technologies to enhance your experience,
show you personalized content, and analyze performance and traffic on our website.
We respect your right to privacy and accordingly you can chose to not allow some types of cookies (and related technologies).
Click on the different category sliders and change our default settings to manage your cookie settings.
For more information on the specific cookies/related technologies we use and on how we use these,
Authentication cookies we use are required to run our services … Cookies are required:
These cookies collect anonymous data and allow us to optimize our
website and user experience. These cookies are listed here:
Help us to understand how visitors interact with our services, enables us
to analyze and improve our services (also through third party analytics).