none
I'm super noob xD RRS feed

  • Question

  • Ok, so I've done research from what I'm seeing i think I'm doing it correctly but apparently not, any help would be greatly appreciated =D

                   

    using UnityEngine;
    using UnityEngine.SceneManagement;

    public class LevelControl : MonoBehaviour
    {



        void OnTriggerEnter(Collider other)
        {

            if (other.CompareTag("Player"))
            {
                SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);

            }

        }

    }

    I'm trying to load one level after the other, It works going from lvl 1 to lvl 2, but doesn't work any further than that, I thought i was calling on the active scene number then adding 1 to get to next scene in the build index

    Tuesday, October 1, 2019 5:00 AM

All replies

  • You are posting in the wrong forum. This is NOT a C# forum it is for administrative scripting only.

    Please post in the vendor forum for you product. It is not a Microsoft product.


    \_(ツ)_/

    Tuesday, October 1, 2019 5:07 AM