コード例 #1
0
    //---------------------------------------------------------------
    public void LoadMap()
    {
        ScrollSnapRect scrollSnapObj = GameObject.FindObjectOfType <ScrollSnapRect>();

        if (!scrollSnapObj)
        {
            Debug.LogError("No scrollSnapRect Object found");
            return;
        }
        if (scrollSnapObj.GetDragStatus() == false)        //if the page is not being dragged
        {
            int pageIndex;
            pageIndex = scrollSnapObj.GetCurrentPage();
            SceneManager.LoadScene("03 Level " + pageIndex.ToString());
        }
    }