I need to delay the load new level by a few second. Please help.This is the script I need to use:
public class myscore : MonoBehaviour {
void OnCollisionEnter2D(Collision2D col){
Debug.Log ("Collision");
if (col.gameObject.tag == "Player") {
score = score + 50;
Destroy (gameObject);
*Here I need to wait for 3 sec then it should load the next level*
SceneManager.LoadScene(nextLevel);
}
}
Hey (not sure why I didn't get an update message for your reply) it seems that Unity have replaced some of the components used since the last time I was involved in any part of networking so I don't think I can help without Googling myself. However, the principal should be the same. I believe the error you are making is trying to delete the object on the client, rather than have the client in question send a message to the host telling it to delete the object. https://docs.unity3d.com/ScriptReference/Networking.NetworkClient.Send.html
– Aluxxi