Question by
Fredd_Truck · Feb 09, 2020 at 05:57 PM ·
c#2dunity 2dcollider2d
Why doesn't my box collider work? (Unity2D) 2019.2.13.f1
Hi, I'm about to close a collider trigger to change the scene but it doesn't want to work. I have googled a lot but nothing works, I also made a debug log but even the trigger didn't.
Here is the Code:
void OnTriggerEnter2D(Collider2D other)
{
if (other.gameObject.name == "Player")
{
Debug.Log("Load..");
SceneManager.LoadScene(newLevel);
}
}
Here is a photo of the 2D collider from the inspector
I have no idea what should work
Comment
Your answer
Follow this Question
Related Questions
OnCollisionEnter2D not calling, but objects are colliding. 1 Answer
Calculate BoxCollider2D based on the actual player sprite 2 Answers
How do I keep enemies (rigidbodies) from pushing each other? 1 Answer
Best way to have a visible clickable area around player? 0 Answers
Best way to have a visible clickable area around player? 0 Answers