using System.Collections; using System.Collections.Generic; using UnityEngine; public class ProductReceiver : MonoBehaviour { ///HashSet enteredBodies = new HashSet(); public int normalProductCount; public int defectiveProductCount; private void OnTriggerEnter(Collider otherCollider) { var product = otherCollider.GetComponentInParent(); if (product != null) { Scoreboard.Instance.ScoreProduct(product); Destroy(product.gameObject); } } }