Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)
private GameObject Level;
private IEnumerator LoadLevel(int i)
    {
        .
        .
        .
        Destroy(Level);
        .
        .
        .
        Level = Instantiate(Resources.Load<gameobject>("L/L" + i), transform.position, Quaternion.identity);
        .
        .
        .
    }

This is what's actually happening behind the scenes.