question

isaac150619 avatar image
isaac150619 asked

Why Does Unity C# PlayFab Party Voice Level Value Not Work ?

(PlayFab Player).VoiceLevel is a { get; set; } between 0 and 1 but when I pass a value its

(error) invalid argument specified and if i put a value over 1 it outputs (error)

Value {0} is out of range. Value must be between 0 and 1.

Am I setting it wrong ? I also got the events working to these methods and the error output from OnRemotePlayerJoined method

public void OnPartyJoined(object _sender, string _networkID)
{
	party_info.Clear();
	PlayFabLocalPlayer localPlayer = PlayFabMultiplayerManager.Get().LocalPlayer;
 	Backend.current.methods.NewParty(_networkID, localPlayer);

 	localPlayer.VoiceLevel = .5f;

 	Debug.Log("Joined Party");

}

public void OnRemotePlayerJoined (object _sender, PlayFabPlayer _player)
{
	Backend.current.methods.GetEntityProfile(_player);

	_player.VoiceLevel = .5f;

}
sdks
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Seth Du avatar image
Seth Du answered

Sorry for the confusion, I have tested the unity SDK and it seems “PlayFabPlayer” parameter in triggered “OnRemotePlayerJoined” function, doesn’t contain “_chatControlHandle” property. It is null and will prompt error when setting or getting voice level. You may duplicate the local chatcontrol and set voice level then. Please note that doing this may only affect local voice setting on this client.

player._chatControlHandle = PlayFabMultiplayerManager.Get().LocalPlayer._chatControlHandle

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

isaac150619 avatar image isaac150619 commented ·

I appreciate you saving me time glooks

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.