29 lines
779 B
C#
29 lines
779 B
C#
using UnityEngine;
|
|
|
|
[CreateAssetMenu(fileName = "NetworkConfig", menuName = "Config/Network Config")]
|
|
public class NetworkConfig : ScriptableObject
|
|
{
|
|
[Header("Global Network Settings")]
|
|
public string ipAddress = "127.0.0.1";
|
|
public int port = 8080;
|
|
|
|
[Header("Multiplayer Ports")]
|
|
public int multiplayerAudioPort = 12345; // For ConvaiSimpleUDPAudio (send/receive)
|
|
public int multiplayerSpeechPort = 12346; // For ConvaiUDPSpeech (send/receive)
|
|
|
|
private static NetworkConfig _instance;
|
|
public static NetworkConfig Instance
|
|
{
|
|
get
|
|
{
|
|
if (_instance == null)
|
|
{
|
|
_instance = Resources.Load<NetworkConfig>("NetworkConfig");
|
|
}
|
|
return _instance;
|
|
}
|
|
}
|
|
}
|
|
|
|
|