OnTriggerEnter2D or OnCollisionEnter2D not getting called

发布时间:2026-01-18 23:34

使用布尔运算符(AND, OR, NOT)进行精确搜索 #生活技巧# #学习技巧# #学术论文检索技巧#

This question shows research effort; it is useful and clear

0

Save this question.

Show activity on this post.

I checked the other answers for this but mine didn't get fixed Here's the code

using System.Collections; using System.Collections.Generic; using UnityEngine; public class DestroyCollectibles : MonoBehaviour { private void Start() { Debug.Log("Hallo"); } private void OnTriggerEnter2D(Collider2D collision) { Debug.Log("Trigger"); } private void OnCollisionEnter2D(Collision2D collision) { Debug.Log("Collsion"); // if (collision.gameObject.CompareTag("Collectible")) // { // Debug.Log("Apple"); // Destroy(collision.gameObject); // } } }

And screenshots:

asked Feb 9, 2021 at 7:47

Sankhayan Bhattacharjee's user avatar

4

网址:OnTriggerEnter2D or OnCollisionEnter2D not getting called https://c.klqsh.com/news/view/321210

相关内容

OnTriggerEnter2D or OnCollisionEnter2D not getting called
Screening for Cervical Cancer
Lost Your PM Kisan Registration Number? Know It Instantly Using Aadhaar Or Mobile – Full Guide Inside!
Getting started with Krita: A free digital painting tool for beginners and pros
Mayo Clinic Q and A: Number of disorders can trigger vertigo
Why is Buffalo’s fan base called ‘Bills Mafia’ and why do they jump on tables?
2021 Dydoe Piercings Pros & Cons by a Piercer S02 EP28
The Boar
US Ex
Delete or De

随便看看