Esempio n. 1
0
    /**
     * Used to hide/show the previous/next buttons.
     */
    void Update()
    {
        var meshPro = Description.GetComponent <TextMeshPro>();

        // If we are at Page < PageCount, we can go a step further so display the NextPage-Button.
        NextPage.SetActive(meshPro.pageToDisplay < meshPro.textInfo.pageCount);

        // If we are at Page > 1, we can go a step back so display the PreviousPage-Button.
        PreviousPage.SetActive(meshPro.pageToDisplay > 1);
    }