jeudi 25 mars 2021

how can i trigger a SetActive on a canvas image, in my if statement - once object is picked up to show that object in the UI canvas system?

i am having errors, how would i get the destroyed item to show up in the UI inventory system?

    void OnTriggerEnter(Collider2D other)
    {
        playerCollecting = other.gameObject;
        if (playerCollecting.tag == "Player")
        {

            InventorySlot(2) = playerCollecting.GetComponent,(bool = spikedWeapon) < InventorySlot > ();
            OnTriggerEnter.InventorySlot(1) = true;
            Destroy(gameObject);
        }

    }

enter image description here

Aucun commentaire:

Enregistrer un commentaire