fixed port conflicts
This commit is contained in:
@ -113,12 +113,21 @@ namespace Convai.Scripts.Runtime.Multiplayer
|
||||
var cfg = networkConfigAsset != null ? networkConfigAsset : NetworkConfig.Instance;
|
||||
if (cfg != null)
|
||||
{
|
||||
listenPort = cfg.port;
|
||||
listenPort = cfg.multiplayerSpeechPort;
|
||||
}
|
||||
}
|
||||
InitializeAudio();
|
||||
InitializeNetwork();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
if (_cancellationTokenSource == null)
|
||||
{
|
||||
_cancellationTokenSource = new CancellationTokenSource();
|
||||
}
|
||||
StartListening();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
@ -126,6 +135,11 @@ namespace Convai.Scripts.Runtime.Multiplayer
|
||||
_cancellationTokenSource?.Cancel();
|
||||
_cancellationTokenSource?.Dispose();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
StopListening();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user