Identifying Collider Problem
I am trying to find the name of a an Object that Just collided with a different game object, but I keep getting an error. Here is the code. Can you tell me what is wrong with it?
Here is the error that keeps getting thrown up.
The answer is probably simple, but could you tell me what I am doing wrong?
Answer by TreyH · Feb 23, 2016 at 05:39 AM
You need to use Collision2D as your function parameter. :-)
http://docs.unity3d.com/ScriptReference/MonoBehaviour.OnCollisionEnter2D.html
Thank you so much. I am very new to Unity! Thanks to you I'm back on my way to developing my platformer/shooting game!
Your answer
Follow this Question
Related Questions
script for object to use its child colliders. 0 Answers
Limit OnTriggerEnter to work with only specific Child Object Colliders 0 Answers
How to make a C# script that makes an enemyAI follow a player the way that Slenderman does? 0 Answers
My player character is jumping infinitely and it didn't use to do that... 0 Answers
Error CS1519 1 Answer