- Home /
I have problem with collision :D,Im New at Unity and Trying To make ,,Game" With Youtube Toturial...
at first im new at unity so dont judge me also english is not my first language,sorry if my question is not understandable.
i was trying to make game by brackeys video and When i Repeat script it showed me error.its saying i shoud use getcomponent but i totally cant understand so here is photo and help me please , Thanks
,I am Repeating Script from a video and it doesnt work... it is saying something i Totally dont understand I think you Notice English is Not My First Language... so thath why its hard to understand Whats problem But from you Guys it Will Be Easier.
Answer by JackhammerGaming · Apr 19, 2020 at 05:30 PM
your script's name is Collision try and change it to something like Collision_Script because Collision is also a data type which may be conflicting make sure you change name within the script also. if that doesn't sought out the error try
void OnCollisionEnter(Collision CollisionInfo){
Debug.Log (CollisionInfo.gameObject.GetComponent<Collider>().name);
}
Welcome on to the journey of game dev :-)