UnityTrafficSimulation/UnityProject/Assets/Scripts/menu/clientMenu.cs
2026-09-13 20:53:11 +01:00

24 lines
553 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.UI;
[NetworkSettings(channel = 0, sendInterval = 0)]
public class clientMenu : NetworkBehaviour
{
public TrafficController traffic;
public Text errorField;
public GameObject next;
public bool hasStarted = false;
public NetworkManager network;
public void joinServer (string address)
{
network.networkAddress = address;
network.StartClient();
errorField.text = "Connecting...";
}
}