using System.Collections; using System.Collections.Generic; using Unity.VisualScripting; using UnityEngine; using TMPro; using UnityEditor.Build; /// /// thuis code is atteched to the player script, it just means to destroy collectable items if the player collides with it. /// public class collectables : MonoBehaviour { public playerScript playerScript; private void OnTriggerEnter2D(Collider2D other) { Destroy(gameObject); } }