Commit 4d78f2d6 authored by Jan Meissner's avatar Jan Meissner
Browse files

Fixed a bug preventing the level select from working as intended

parent b9b47a01
......@@ -36,8 +36,13 @@ public class LevelSelectController : MonoBehaviour {
button.SetActive(false);
// Deactivates NextPageButton because there isnt' a next page
GameObject nextPage = button.transform.parent.Find("ButtonNextPage").gameObject;
nextPage.SetActive(false);
if (button.transform.parent.Find("ButtonNextPage") != null)
{
GameObject nextPage = button.transform.parent.Find("ButtonNextPage").gameObject;
nextPage.SetActive(false);
}
// Next page can't be opened so buttons on it don't have to be changed
if (i % 6 == 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment