Skip to main content
added 76 characters in body
Source Link
if (col.gameObject.nametag == "object1" && col.gameObject.tag == "object2")

You forgot the 2nd col.gameObject.id

Sorry... I changed the name to tag (you must tag the object first)

if (col.gameObject.name == "object1" && col.gameObject == "object2")

You forgot the 2nd col.gameObject

if (col.gameObject.tag == "object1" && col.gameObject.tag == "object2")

You forgot the 2nd col.gameObject.id

Sorry... I changed the name to tag (you must tag the object first)

Source Link

if (col.gameObject.name == "object1" && col.gameObject == "object2")

You forgot the 2nd col.gameObject