Answer the question
In order to leave comments, you need to log in
How to wait to connect to the server in multiplayer on Unity?
Hello! There is a code:
private NetworkManager manager;
[SerializeField] private GameObject netManager;
void Start ()
{
Debug.Log("Connection...");
manager = netManager.GetComponent<NetworkManager>();
manager.StartClient();
// Как сделать вот тут задержку и не писать в логе "Connection" пока сервер не будет подключен
Debug.Log("Connection");
}
Answer the question
In order to leave comments, you need to log in
You can, for example, inherit from NetworkManager and overload the OnStartClient method , and then fire an event inside or something else.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question