There is a project on unity. The bottom line is that when loading a new (second) level from the prefab, I have to delete the old (first) level with the Level tag. I do it like this:
GameObject[] objects = GameObject.FindGameObjectsWithTag("Level"); foreach (GameObject item in objects) { Destroy(item); Debug.Log("Destroy1"); } objects = GameObject.FindGameObjectsWithTag("Respawn"); foreach (GameObject item in objects) { Destroy(item); Debug.Log("Destroy2"); } hero.level = Instantiate(AssetDatabase.LoadAssetAtPath(string.Format("Assets/Resources/Levels/{0}lvl.prefab",hero.lvl), typeof(GameObject))) as GameObject; hero.level.transform.position = new Vector3(0, 0, -1); Debug.Log(GameObject.FindGameObjectsWithTag("Level").Length); hero.gameObject.transform.position = GameObject.FindWithTag("Respawn").transform.position; But, as a result, my hero falls on the first level to the old place, well, that is, to the first Respawn. What to do, I won’t add my mind, for I have already tried almost everything that exists. Thank)
UPD: I would also like to note that the objects themselves are hidden, that is, there really is a feeling that everything has disappeared, but the program does not think so.