public void SwitchToMenuFronCatalog() { LoadCatalog CatalogueScript = GameObject.Find("Viewport").GetComponent <LoadCatalog>(); if (CatalogueScript.showingItems) { SceneManager.LoadScene("Catalog"); } else { SwitchToMenu(); } }
// Start is called before the first frame update void Start() { CatalogueScript = GameObject.Find("Viewport").GetComponent <LoadCatalog>(); if (ParentPanel == GameObject.Find("Category Container")) { GenerateButtons(CatalogueScript.foundCategories); } else if (ParentPanel == GameObject.Find("Designer Container")) { GenerateButtons(CatalogueScript.foundDesigners); } else if (ParentPanel == GameObject.Find("Brand Container")) { GenerateButtons(CatalogueScript.foundBrands); } else { Debug.Log("Couldn't find parent"); } }