// Start is called before the first frame update void Start() { fightState = GameObject.FindWithTag("FightState").GetComponent <FightState>(); fightState.SetShopComponent(GetComponent <ShopScene>()); foreach (Transform tf in canvas.transform) { tf.gameObject.SetActive(false); } gameObject.SetActive(false); }