Y
Y
yraiv2020-06-06 16:48:47
Unity
yraiv, 2020-06-06 16:48:47

Object in canvas and collision2d?

There are objects in the canvas, when they reach the collider, they must interact with it.
Why might not work?

void OnCollider2D (Collision2D coll)
    {
        if (coll.gameObject.tag == "BorderUp")
        {
            _MobUpGo.enabled = false;
            Debug.Log("yes");
        }
    }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2020-06-07
@Lampochkagori

it?
https://docs.unity3d.com/ScriptReference/Collider2...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question