simplified network setup
This commit is contained in:
@ -18,6 +18,8 @@ public class VRExperimentController : MonoBehaviour
|
||||
[Header("Network Settings")]
|
||||
[SerializeField] private int udpPort = 1221;
|
||||
[SerializeField] private bool allowPortSharing = true; // For local testing with multiple components
|
||||
[SerializeField] private bool useGlobalNetworkConfig = true;
|
||||
[SerializeField] private NetworkConfig networkConfigAsset;
|
||||
|
||||
[Header("Avatar Assignments")]
|
||||
[SerializeField] private GameObject helpfulAvatar;
|
||||
@ -55,6 +57,15 @@ public class VRExperimentController : MonoBehaviour
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Apply global config if enabled
|
||||
if (useGlobalNetworkConfig)
|
||||
{
|
||||
var cfg = networkConfigAsset != null ? networkConfigAsset : NetworkConfig.Instance;
|
||||
if (cfg != null)
|
||||
{
|
||||
udpPort = cfg.port;
|
||||
}
|
||||
}
|
||||
InitializeObjectMaps();
|
||||
StartUDPListener();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user