void Awake() { menuScript = GetComponent <Mockup_Menu>(); if (menuScript == null) { Debug.LogError("All global scripts needs to be inside the same object!"); } }
void Awake() { menuScript = GetComponent <Mockup_Menu>(); if (menuScript == null) { Debug.LogError("All global scripts needs to be inside the same object!"); } sessionData = GameObject.FindWithTag("SessionData").GetComponent <SessionData>(); }
public void Setup() { string sceneName = SceneManager.GetActiveScene().name; if (sceneName == "Menu Product") { menuScript = GetComponent <Mockup_Menu>(); LoadProductDetail(); } else if (sceneName == "Menu Katalog") { string filename = productAttr.name.Replace(" ", string.Empty); productCatalogItems.productImage.sprite = SessionData.GetSprite(filename); productCatalogItems.productName.text = productAttr.name; productCatalogItems.productPrice.text = productAttr.price.ToString("0,0"); } }
void Start() { menuScript = GetComponent <Mockup_Menu>(); sessionData = GameObject.FindWithTag("SessionData").GetComponent <SessionData>(); InitCart(); }
void Awake() { menuScript = GetComponent <Mockup_Menu>(); }