Answer the question
In order to leave comments, you need to log in
Unity (C#) - How to check if a specific script is attached to an object?
There is an object to which a certain script is attached, and there is another object with a script. When the first object collides with any other object, you need to check if the other object has that script attached to the second object. How to do it?
Answer the question
In order to leave comments, you need to log in
Use the OnCollisionEnter event and the GetComponent method .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question