private void OnCollisionEnter(Collision collision) { if (collision.gameObject.CompareTag("Player")) { ControllableBehave playerBehave = collision.gameObject.GetComponent <ControllableBehave>(); var item = playerBehave.GetItem(itemID); item.GetComponent <ItemBasic>().level = level; #if UNITY_EDITOR Debug.Log($"GetItem: Item_{itemID}"); #endif Instantiate(Resources.Load($"Prefabs/Particles/Explosion_{Random.Range(0, 10)}"), transform.position, Quaternion.identity); Destroy(gameObject); } }