added peer discovery settings to NetworkConfig and updated UDP broadcasting scripts to handle peer discovery events
This commit is contained in:
@ -6,6 +6,19 @@ public class NetworkConfig : ScriptableObject
|
||||
[Header("Global Network Settings")]
|
||||
public string ipAddress = "127.0.0.1";
|
||||
public int port = 1221; // Single port for all UDP communication
|
||||
|
||||
[Header("Peer Discovery Settings")]
|
||||
[Tooltip("Enable auto-discovery to find peer Quest Pro on same network")]
|
||||
public bool useAutoDiscovery = true;
|
||||
|
||||
[Tooltip("Fallback broadcast IP if discovery fails (default: 255.255.255.255)")]
|
||||
public string fallbackBroadcastIP = "255.255.255.255";
|
||||
|
||||
[Tooltip("How often to broadcast discovery requests (seconds)")]
|
||||
public float discoveryIntervalSeconds = 2.0f;
|
||||
|
||||
[Tooltip("Time before considering peer lost (seconds)")]
|
||||
public float peerTimeoutSeconds = 15.0f;
|
||||
|
||||
private static NetworkConfig _instance;
|
||||
public static NetworkConfig Instance
|
||||
|
||||
Reference in New Issue
Block a user